本地配置虚拟主机

1、Apache\conf\httpd.conf

去掉Include conf/extra/httpd-vhosts.conf 前的注释

2、Apache\conf\extra\httpd-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:\Windows\System32\drivers\etc\hosts   添加你的虚拟主机

 

posted @ 2018-02-26 16:56  西贝小小凤  阅读(667)  评论(0编辑  收藏  举报