Parse the virtual machine configuration document under wamp5

  • 2020-06-22 23:58:27
  • OfStack

Under Wamp, virtual machine configuration is divided into three steps. Examples are 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-ES17en.conf file to 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 >

After adding this sentence, if you don't remember to add the following sentence, or localhost can't open better add
< VirtualHost *:80 >
ServerName localhost
ServerAlias localhost
DocumentRoot "D:/wamp/www"
< /VirtualHost >

3. Edit the E:\wamp\ apache\ Apache2.2.11 \conf\ httpd.conf to add the following code at the bottom of the file
Note: Failure to add this code will result in a 403 error
Open the configuration file httpd.conf and remove the #Include 0conf/extra/ httpd-ES68en.conf!!
< Directory "e:/wamp/www/dz1" >
Options Indexes FollowSymLinks
AllowOverride all
Order Allow,Deny
Allow from all
< /Directory >
Restart Apache and then test dz1.test.com and you are done.
.
Note that the bold red part must be the same and the file exists


Related articles: