在httpd.conf中使Include conf/extra/httpd-vhosts.conf生效
在conf/extra/httpd-vhosts.conf中加入如下代码
<VirtualHost *:80>
DocumentRoot "c:\wamp\www\a"
ServerName www.a.net
<Directory "c:/wamp/www/a">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "c:\wamp\www\b"
ServerName www.b.com
<Directory "c:/wamp/www/b">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
重启wamp
时间: 2024-10-15 21:02:27