wamp配置虚拟主机

1、编辑httpd.conf,查找Include conf/extra/httpd-vhosts.conf,把前面注释符号“#”删掉

2、编辑httpd-vhosts.conf,我把WAMPServer安装在D:/wamp,所以我这里的路径是D:\wamp\Apache2\conf\extra

<VirtualHost *:80>
        DocumentRoot D:\www\act.xunyou.com
        ServerName act.xunyou.com
        <Directory "D:\www\act.xunyou.com">
            Options Indexes FollowSymLinks
            AllowOverride None
            Order allow,deny
            Allow from all
        </Directory>
 </VirtualHost>

 3、修改C:/WINDOWS/system32/drivers/etc/host这个文件,用记事本打开,加上如下内容:

   127.0.0.1  act.xunyou.com

猜你喜欢

转载自stelin.iteye.com/blog/1997736