在httpd.conf中使Include conf/extra/httpd-vhosts.conf生效
在conf/extra/httpd-vhosts.conf中加入如下代码
<VirtualHost *:80>
DocumentRoot "c:wampwwwa"
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:wampwww"
ServerName www.b.com
<Directory "c:/wamp/www/b">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
重启wamp