1. First, WAMP directory to find httpd.conf file in a specific directory \ bin \ apache \ apache2.4.9 \ conf
2. Then copy the following line to the bottom of the file
- <VirtualHost *:80>
- DocumentRoot "D:/wamp/www/web/code1"
- ServerName www.test.com
- <Directory "D:/wamp/www/web/code1">
- Options Indexes FollowSymLinks
- AllowOverride All
- Order allow,deny
- Allow from all
- </Directory>
- </VirtualHost>
3. Locate the C drive, find C: \ Windows \ System32 \ drivers \ etc folder and then the following hosts open configuration
4. If not reboot or restart Apache error
Forbidden:You don't have permission to access / on this server.
The reason is that: your file path will report this error out wamp / wwww
The reason for this error is usually reported as follows:
Then our case is part of the fourth
Open the folder wamp following bin folder to find the Apache Open the following conf folder. Find httpd.conf file will open 240 lines read:
- <Directory />
- Options Indexes FollowSymLinks
- AllowOverride All
- Order allow,deny
- Allow from all
- </Directory>
Alternatively, you can refer to this practice http://blog.csdn.net/zhangweiguangsunjiao/article/details/51750932