1. 安装好wamp,根据系统环境下载并安装好,若提示缺少msvcr110.dll,则安装vc++2012,然后重新来一遍
  2. 配置虚拟机目录到wamp目录下,如"D:/dev/wamp/wamp/vhosts/*",原本默认是在apache里面,在apache的conf/httpd.conf文件末尾去掉前面的#号
Include "D:/dev/wamp/wamp/vhosts/*"
Include "D:/dev/wamp/wamp/alias/*"
  1. 在上面配置的目录"D:/dev/wamp/wamp/vhosts/*"下添加虚拟机格式
<VirtualHost *:80>    
    DocumentRoot "D:/a/b/c" // 目录路径左斜杠右斜杠都可以
    ServerName a.com
    ServerAlias a.com
    <Directory "D:\a\b\c"> // 目录路径左斜杠右斜杠都可以,这里也可写为<Directory />
        Options FollowSymLinks
        AllowOverride All  // 允许url重写
        Order deny,allow
        Allow from all
        Require all granted  // 授权所有请求通过,防止禁止访问错误403
    </Directory>
</VirtualHost>

下面这种也可以,wamp3.1的默认是这样子的

<VirtualHost *:80>
	ServerName wwwa
	DocumentRoot "D:/a/b/c"
	<Directory  "D:/a/b/c">
		Options +Indexes +Includes +FollowSymLinks +MultiViews
		AllowOverride All
		Require local
	</Directory>
</VirtualHost>