Wamp, the virtual machine configuration is divided into three steps, with the following examples:
1. Modify the Hosts file
C:\WINDOWS\system32\drivers\etc\Hosts
127.0.0.1 dz1.test.com
2. Edit the wamp\bin\apache\apache2.2.11\conf\extra\httpd-vhosts.conf file and add the following code at the bottom of the file
<virtualhost *:80>
ServerName dz1.test.com
Serveralias dz1.test.com
DocumentRoot "e:/wamp/www/dz1"
</VirtualHost>
In addition to this sentence, if not the following sentence to remember to add, or hit localhost can not open the best plus
<virtualhost *:80>
ServerName localhost
Serveralias localhost
DocumentRoot "D:/wamp/www"
</VirtualHost>
3. Edit the E:\wamp\bin\apache\Apache2.2.11\conf\httpd.conf file and add the following code at the bottom of the file
Note: 403 error is reported without this code
Open the configuration file httpd.conf and remove the # #include 0conf/extra/httpd-vhosts.conf front!!
<directory "e:/wamp/www/dz1" >
Options Indexes FollowSymLinks
AllowOverride All
Order Allow,deny
Allow from all
</Directory>
Restart Apache, and then test the dz1.test.com, it's OK.
。。。。。。。。。。。。。。。。
Note that the red bold section must be the same and that the file exists