Appserv配置多站点访问

时间:2014-05-23 22:49:43   收藏:0   阅读:406

1. 找到hosts文件

 C:\Windows\System32\drivers\etc

最后加入,你想要访问的网址,如: 

127.0.0.1 localhost
127.0.0.1 wechatqy.com
127.0.0.1 js

 

2.找到Apache下httpd.conf文件,我的目录是E:\AppServ\Apache2.2\conf

去掉#

#Include conf/extra/httpd-vhosts.conf

去掉#

#LoadModule vhost_alias_module modules/mod_vhost_alias.so

端口Listen 80后面加上,如:

Listen 80
Listen 81
Listen 82

 

3.找到Apache下httpd-vhosts.conf文件,我的目录是E:\AppServ\Apache2.2\conf\extra

最后面加入

<VirtualHost *:80>
DocumentRoot "E:/AppServ/www"
ServerName localhost
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "E:/AppServ/www/weixinqy"
ServerName wechatqy
</VirtualHost>


<VirtualHost *:80>
DocumentRoot "E:/AppServ/www/JavaScript"
ServerName js
</VirtualHost>

 

4.重启apache,大功告成.

Appserv配置多站点访问,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!