Wamp multi-site configuration and wamp site configuration
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:
<Directory/>
Options FollowSymLinks
AllowOverride None
Order deny, allow
Deny from all
</Directory>
Changed:
<Directory/>
Options FollowSymLinks
AllowOverride None
Order deny, allow
# Deny from all
Allow from all
# Allow all access
Satisfy all
</Directory>
3. Open the httpd-vhosts.conf and add the following code (modify the wamp installation path on your own) in the bottom blank space ):
<VirtualHost *: 80>
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
</VirtualHost>
<VirtualHost *: 80>
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
</VirtualHost>
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.