There are all kinds of methods online, I specially recorded them, and friends who need them can just take them by themselves.
File to be modified: httpd.conf / httpd-vhosts.conf / hosts
Corresponding path:
httpd.conf:wampbinapacheApache2.2.21conf
httpd-vhosts.conf:wampbinapacheApache2.2.21confextra
hosts:cWindowsSystem32driversetc
Modification process:
1. Open httpd.conf, about 466 lines: #Include conf/extra/httpd-info.conf, delete #;
2. Still httpd.conf, about 188 lines:
< Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Changed to:
Options FollowSymLinks
AllowOverride None
Order deny,allow
#Deny from all
Allow from all
#Allow all access
Satisfy all
3. Open httpd-vhosts.conf and add the following code in the bottom blank space (Modify the wamp installation path yourself) :
& lt; virtualHost *: 80 & gt;
serveradmin webmaster@dummy-host.example.com
documentroot "f:/wamp/www"
server localhost
serverias w ww.dummy-host.example.com
errorLog " logs/dummy-host.example.com-error.log"
CustomLog "logs/dummy-host.example.com-access.log" common
ServerAdmin webmaster@ dummy-host.example.com
DocumentRoot "f:/wamp/www2"
ServerName www2.com
ServerAlias www.dummy-host.example.com
ErrorLog "logs/dummy-host.example.com- error.log"
CustomLog "logs/dummy-host.example.com-access.log" common
4. The last step: open the hosts file and add the following code below the last line:
127.0 .0.1 localhost
127.0.0.1 www2.com
After restarting wamp, localhost and www2.com can be developed separately, and multi-site configuration is successful.
The above has introduced the wamp multi-site configuration, including various aspects. I hope it will be helpful to friends who are interested in PHP tutorials.