一、双击打开httpd.conf文件找到 #Include conf/extra/httpd-vhosts.conf 起掉#
二、httpd-vhosts.conf添加站点
<VirtualHost *:80>
DocumentRoot D:/wamp/website/a.com
ServerName www.a.com
<Directory "D:/wamp/website/a.com">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
三、在C:\Windows\System32\drivers\etc\host 加127.0.0.2 虚拟主机名
原文:http://www.cnblogs.com/yexiangwang/p/4921886.html