1、Apacheconfhttpd.conf
去掉Include conf/extra/httpd-vhosts.conf 前的注释
2、Apacheconfextrahttpd-vhosts.conf
添加
<VirtualHost *:80> ServerAdmin webmaster@dummy-host2.example.com DocumentRoot "E:/phpStudy/WWW/zyyw" ServerName www.zyyw.com ErrorLog "logs/dummy-host2.example.com -error.log" CustomLog "logs/dummy-host2.example.com -access.log" common </VirtualHost>
3、C:WindowsSystem32driversetchosts 添加你的虚拟主机