中国IT动力,最新最全的IT技术教程
最新100篇 | 推荐100篇 | 专题100篇 | 排行榜 | 搜索 | 在线API文档
首 页 | 程序开发 | 操作系统 | 软件应用 | 图形图象 | 网络应用 | 精文荟萃 | 教育认证 | 硬件维护 | 未整理篇 | 站长教程
ASP JS PHP工程 ASP.NET 网站建设 UML J2EESUN .NET VC VB VFP 网络维护 数据库 DB2 SQL2000 Oracle Mysql
服务器 Win2000 Office C DreamWeaver FireWorks Flash PhotoShop 上网宝典 CorelDraw 协议大全 网络安全 微软认证
硬件维护  CPU  主板  硬盘  内存  显卡  显示器  键盘鼠标  声卡音箱  打印机  机箱电源  BIOS  网卡  C#  Java  Delphi  vs.net2005
  当前位置:> 操作系统 > 服务器 > Web服务器
求教,怎样配置mod,才能禁止目录下无index文件时,目录被列表。
作者:未知 时间:2005-09-13 17:27 出处:ChinaUnix.net 责编:chinaitpower
              摘要:求教,怎样配置mod,才能禁止目录下无index文件时,目录被列表。

求教,怎样配置mod,才能禁止目录下无index文件时,目录被列表。


按照某些资料,禁用“LoadModule autoindex_module modules/mod_autoindex.so”后,Apache 2.0.49 重启失败。请列位看看有什么办法。

 goodloveboys 回复于:2004-07-05 10:40:48
<Directory /home>
  Options -Indexes
</Directory>

 kroll 回复于:2004-07-05 10:53:51
谢谢,照这样设置以后

<Directory "C:/www/Apache2/htdocs/bbs">
Options -Indexes
</Directory>

文件不被列表了,可是子目录还是会列表,怎么办呢???

 goodloveboys 回复于:2004-07-05 10:57:54
在/bbs下的 目录  还会被列表?

 kroll 回复于:2004-07-05 12:08:27
是的。有些目录里是没有index文件的。
应该跟Apache缺省的目录属性有关。最好能把缺省的设置改了,一劳永逸。

 geel 回复于:2004-07-05 21:45:32
<Directory Your_Root>
Options None
</Directory>

 kroll 回复于:2004-07-06 10:30:53
OK,感谢列位大侠支招。。

 Nanu 回复于:2005-02-21 00:43:21
呵呵,在目录里放一个空的或者带有欺骗性质的index.html不就成了。
这样觉得最简单了。。。 :em03:

 安静 回复于:2005-02-24 14:06:44
和楼主一样 
<Directory Your_Root> 
Options None 
</Directory> 
更改一后 子目录的文件还是会被显示。有办法解决吗?

 inse7100 回复于:2005-02-26 03:51:56
httpd.conf

<Directory Your_Root> 
Options -indexes
</Directory> 

But if you have something like

<Directory Your_Root/subdirectory> 
Options indexes
</Directory> 

The setting will overwrite the root setting. Check the subdirectories setting.

Don't forget, after every change you make for httpd.conf, restart the httpd daemon.

 :em11:

关闭本页
 
首页 | 投资与合作 | 服务条款 | 隐私政策 | 收藏本站 | 设为首页 | 新用户注册 | 免责声明 | 使用帮助
Copyright ©2005-2008 chinaitpower.com All rights reserved. www.chinaitpower.com 版权所有