1.在httpd.conf中開啟Include conf/extra/httpd-vhosts.conf
2.修改C:wamp64binapacheapache2.4.17confextrahttpd-vhost.conf,加入如下
<VirtualHost *:80> 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教學有興趣的朋友有幫助。