Apache 配置虚拟

来源:互联网 发布:彩妆淘宝店找货源 编辑:程序博客网 时间:2024/06/05 03:23

Apache 2.2 升級到 2.4 的 Conf 調整修復   在这里http://blog.longwin.com.tw/2014/03/apache-22-24-upgrade-conf-2014/


韩顺平老师用的是2.2版本 

1.      添加虚拟目录的节点

 

#配置虚拟目录

<IfModule dir_module>

    #direcotory相当于是欢迎页面

    DirectoryIndex index.html index.htmindex.php

    #你的站点别名

    Alias /myblog "D:/myblog"

   <Directory d:/myblog>

   #这是访问权限设置

   Order allow,deny

   Allow from all      #红字改为 Require all granted(2.4版本)

   </Directory>

</IfModule>

 


 

3.      测试

http://localhost/myblog/news.html

 

4.      如何设置欢迎页面

 

http://localhost/myblog/

 

DirectoryIndex news.html index.html index.htmindex.php

 


0 0