: This article mainly introduces wamp multi-site configuration. if you are interested in the PHP Tutorial, refer to it. The method on the Internet is five flowers and white door. I want to record it specially. if you need a friend, just take it as needed.
Files to be modified: httpd. conf/httpd-vhosts.conf/hosts
Corresponding path:
Httpd. conf: wamp \ bin \ apache \ Apache2.2.21 \ conf
Httpd-vhosts.conf: wamp \ bin \ apache \ Apache2.2.21 \ conf \ extra
Hosts: c \ Windows \ System32 \ drivers \ etc
Modification process:
1, open httpd. conf, about 466 lines: # Include conf/extra/httpd-info.conf, delete #;
2, or httpd. conf, about 188 rows:
Options FollowSymLinks
AllowOverride None
Order deny, allow
Deny from all
Changed:
Options FollowSymLinks
AllowOverride None
Order deny, allow
# Deny from all
Allow from all
# Allow All Access
Satisfy all
3. open the httpd-vhosts.conf and add the following code (modify the wamp installation path on your own) in the bottom blank space ):
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "f:/wamp/www"
ServerName localhost
ServerAlias www.dummy-host.example.com
ErrorLog "log/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 "log/dummy-host.example.com-error.log"
CustomLog "logs/dummy-host.example.com-access.log" common
4. last step: Open the hosts file and add the following code under the last line:
127.0.0.1 localhost
127.0.0.1 www2.com
After wamp is restarted, localhost and www2.com can be used to differentiate Development. the configuration of multiple sites is successful.
The preceding section describes the wamp multi-site configuration, including related content, and hopes to help those who are interested in the PHP Tutorial.