码迷,mamicode.com
首页 > 其他好文 > 详细

wamp 虚拟目录的实现

时间:2014-12-01 15:38:39      阅读:163      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   io   color   os   sp   文件   on   

1、修改http.conf文件(D:\wamp\bin\apache\apache2.4.9\conf):

将 Include conf/extra/httpd-vhosts.conf 前面的#去掉;

2、修改httpd-vhosts.conf文件(D:\wamp\bin\apache\apache2.4.9\conf\extra):

将原有的 <VirtualHost *:80></VirtualHost> 删除;

加入以下语句:

<VirtualHost *:80>
        DocumentRoot D:/wamp/www
        ServerName localhost
        <Directory "D:/wamp/www">
            Options Indexes FollowSymLinks
            AllowOverride None
            Order allow,deny
            Allow from all
        </Directory>
</VirtualHost>

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

3、修改hosts文件(C:\Windows\System32\drivers\etc):

加入语句 127.0.0.1 www.ubeacon.com

4、重启wamp所有服务;

以上所做配置为本机设置成了两个虚拟主机 localhost 和 www.ubeacon.com。

wamp 虚拟目录的实现

标签:style   blog   http   io   color   os   sp   文件   on   

原文地址:http://www.cnblogs.com/sunny-blog/p/4135048.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!