Windows下 wamp下Apache配置虚拟域名


 

安装好wamp后  找到

 

找到  Include conf/extra/httpd-vhosts.conf   去掉前面的#   并保存

 

          

 

修改 DocumentRoot  和  ServerName

<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot "D:\wamp\www"
    ServerName  www.shop.com
    ServerAlias www.dummy-host.example.com
    ErrorLog "logs/dummy-host.example.com-error.log"
    CustomLog "logs/dummy-host.example.com-access.log" common
</VirtualHost>

 

找到

 

 

修改成

    

 

 

重新启动Apache,就好了

 

posted @ 2015-09-14 15:12  IT树  阅读(215)  评论(0编辑  收藏  举报