[Modify] I tested it myself and removed the virtual sub-directory from the Wampwww directory. For example, I created a new directory on another disk to store sub-directories. This seems to solve the problem, but I still don't know why. Environment: windowsserver2003 software: wamp version 2.4 current status...
[Modification]
I tested it myself and removed the virtual sub-directory from the Wamp \ www directory. For example, I created a new directory to store sub-directories on another disk. This seems to solve the problem, but I still don't know why.
Environment: windows server 2003
Software: wamp version 2.4
Current status: the server is normal, and the web Internet can be accessed (through port 8081), both through IP address and domain name
Requirement: I have multiple subdomain names and want to create virtual directories, such as wamp \ www \ test \ corresponding domain name test.abc.com
Problem: Open test.abc.com: 8081 and directly go to the www directory. The folder directory of the webpage version is displayed.
(Note: I use port 8081)
My processing process: 1. Baidu Google found some tutorials and configured apache conf. The configuration is as follows: loading VirtualHost is Enabled:
# Virtual hostsInclude conf/extra/httpd-vhosts.conf
2. Then add the virtual directory:
Comment out the original
#
#ServerAdmin webmaster@dummy-host.example.com #DocumentRoot "c:/Apache24/docs/dummy-host.example.com" #ServerName dummy-host.example.com #ServerAlias www.dummy-host.example.com #ErrorLog "logs/dummy-host.example.com-error.log" #CustomLog "logs/dummy-host.example.com-access.log" common#
#
#ServerAdmin webmaster@dummy-host2.example.com #DocumentRoot "c:/Apache24/docs/dummy-host2.example.com" #ServerName dummy-host2.example.com #ErrorLog "logs/dummy-host2.example.com-error.log" #CustomLog "logs/dummy-host2.example.com-access.log" common#
Add a new virtual directory
Options Indexes Order allow,deny Allow from all
DocumentRoot d:/wamp/www/test/ ServerPath d:/wamp/www/test/ ServerName test.abc.info
The result is displayed as follows:
This is the general situation. I hope you can check it out for me.
The problem has been disabled. cause:
Reply content:
[Modification]
I tested it myself and removed the virtual sub-directory from the Wamp \ www directory. For example, I created a new directory to store sub-directories on another disk. This seems to solve the problem, but I still don't know why.
Environment: windows server 2003
Software: wamp version 2.4
Current status: the server is normal, and the web Internet can be accessed (through port 8081), both through IP address and domain name
Requirement: I have multiple subdomain names and want to create virtual directories, such as wamp \ www \ test \ corresponding domain name test.abc.com
Problem: Open test.abc.com: 8081 and directly go to the www directory. The folder directory of the webpage version is displayed.
(Note: I use port 8081)
My processing process: 1. Baidu Google found some tutorials and configured apache conf. The configuration is as follows: loading VirtualHost is Enabled:
# Virtual hostsInclude conf/extra/httpd-vhosts.conf
2. Then add the virtual directory:
Comment out the original
#
#ServerAdmin webmaster@dummy-host.example.com #DocumentRoot "c:/Apache24/docs/dummy-host.example.com" #ServerName dummy-host.example.com #ServerAlias www.dummy-host.example.com #ErrorLog "logs/dummy-host.example.com-error.log" #CustomLog "logs/dummy-host.example.com-access.log" common#
#
#ServerAdmin webmaster@dummy-host2.example.com #DocumentRoot "c:/Apache24/docs/dummy-host2.example.com" #ServerName dummy-host2.example.com #ErrorLog "logs/dummy-host2.example.com-error.log" #CustomLog "logs/dummy-host2.example.com-access.log" common#
Add a new virtual directory
Options Indexes Order allow,deny Allow from all
DocumentRoot d:/wamp/www/test/ ServerPath d:/wamp/www/test/ ServerName test.abc.info
The result is displayed as follows:
This is the general situation. I hope you can check it out for me.
This way ..
# Default serverNameVirtualHost * in httpd. conf: 80
ServerName localhost DocumentRoot "D: \ wamp \ www" ServerAdmin yoo@gay.cn
Include conf/vhost/*-vhost. conf
# This is the corresponding/vhost/project1-vhost.conf
DocumentRoot "D: \ wamp \ www \ project1" ServerName project1.com
# Port number does not need to change ServerAdmin mail@domain.com # Here is your website administrator mailbox, generally casually set a DocumentRoot "c: /wamp/www/domain.com "# Here is the root directory of your website. In the HOSTS file, add the corresponding IP address and domain name ServerName domain.com # Here is your domain name.
We recommend that you switch to XAMPP. Currently, WAMP is not very powerful.
Your first step is correct, in fact there is an example in the httpd-vhosts.conf file, you cancel the annotation of A, change to your own domain name can be, in HOSTS, you must add the domain name you set.