1、在C:wampvhostsvhost.conf文件中添加
<VirtualHost *:80>
ServerName ***.com
ServerAlias ***.com
DocumentRoot D:PHP*** --项目路径
DirectoryIndex index.php index.html index.htm
<Directory D:PHP***>--项目路径
Options +Includes -Indexes
AllowOverride All
Order Deny,Allow
Require all granted
</Directory>
</VirtualHost>
2、在C:WindowsSystem32driversetchosts里面添加
127.0.0.1 ***.com
3、打开httpd.conf 找到最后
#IncludeOptional "c:/wamp/vhosts/*"
Include "c:/wamp/alias/*" 去掉前面的#号
重启服务器