设置apache 不能直接访问目录

来源:互联网 发布:青岛10月天气数据 编辑:程序博客网 时间:2024/06/03 19:13
在   httpd.conf   作一下小小的修改就可以解決了~  

首先请找到以下文字:  

<Directory   \ "你的apache安装路径\ ">  

#
#   This   may   also   be   "None ",   "All ",   or   any   combination   of   "Indexes ",
#   "Includes ",   "FollowSymLinks ",   "ExecCGI ",   or   "MultiViews ".
#
#   Note   that   "MultiViews "   must   be   named   *explicitly*   ---   "Options   All "
#   doesn 't   give   it   to   you.
#
Options   Indexes   FollowSymLinks  


把   Options   Indexes   FollowSymLinks这行改成   Options   None   就可以了。  

然后重启APACHE服务器,再看看http://localhost/,是不是变成了:  

Forbidden  
You   don\ 't   have   permission   to   access   /   on   this   server.  
--------------------------------------------------------------------------------  

Apache/1.3.14   Server   at   localhost   Port   80  

--------------------------------------------------------------------------------
0 0
原创粉丝点击