1.在httpd.conf中开启Include conf/extra/httpd-vhosts.conf
2.修改C:\wamp64\bin\apache\apache2.4.17\conf\extra\httpd-vhost.conf,添加如下
<virtualhost> ServerAdmin project.com DocumentRoot "C:\wamp64\www\project" ServerName project.com ErrorLog "logs/dummy-host2.example.com-error.log" CustomLog "logs/dummy-host2.example.com-access.log" common </virtualhost>
127.0.0.1 project.com
以上就介绍了 apache虚拟域名的设置,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。