This article provides a detailed analysis of the methods used in the wamp5 virtual machine configuration document. For more information, see
This article provides a detailed analysis of the methods used in the wamp5 virtual machine configuration document. For more information, see
In Wamp, Hong Kong servers are rented. The virtual machine configuration is divided into three steps. The instance is as follows:
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
ServerName dz1.test.com
ServerAlias dz1.test.com
DocumentRoot "e:/wamp/www/dz1"
After adding this sentence, if you do not remember to add the following sentence, otherwise it is best to add it if you cannot open localhost.
ServerName localhost
ServerAlias localhost
DocumentRoot "D:/wamp/www"
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: If this code is not added, error 403 is returned.
Open the configuration file httpd. conf and remove the # Before # Include 0 conf/extra/httpd-vhosts.conf !!
Options Indexes FollowSymLinks
AllowOverride all
Order Allow, Deny
Allow from all
Restart Apache and test dz1.test.com.
................
Note that the red and bold parts must be the same on the U.S. server and the files must exist.
, US space