您的位置:首页 > 运维架构 > Apache

使用apache配置多个虚拟目录

2011-08-23 15:50 393 查看
这几天帮同事弄虚拟目录,感觉好就没弄APACHE,手慢了许多,进入正题说说过程吧。

其实就是要弄两个虚拟目录,
http://10.90.23.202/test1 http://10.90.23.202/test2,
其中/test1 对应一个我本地C盘的目录, /test2 对应另一个我本地C盘的目录,刚开始被网上的帖子忽悠设置成虚拟主机,后来自己发现,其实很简单,

只需要打开httpd.conf文件,在<IfModule alias_module>中,添加多个alias和directory即可,如下:

**************************************************************

    Alias "/test1" "C:\test\ReportDoc"

    <Directory   "C:\test\ReportDoc">   

              Options   Indexes   Includes   FollowSymLinks   MultiViews   IncludesNoExec   

              AllowOverride   None   

              Order   allow,deny   

              Allow   from   all   

    </Directory>  

    Alias "/test2" "C:\Documents and Settings\test\build"

    <Directory   "C:\Documents and Settings\test\build">   

              Options   Indexes   Includes   FollowSymLinks   MultiViews   IncludesNoExec   

              AllowOverride   None   

              Order   allow,deny   

              Allow   from   all   

    </Directory>  

**************************************************************

httpd.conf其他地方不要修改
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  apache build module c