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

王朝厨房·作者佚名  2007-01-05
窄屏简体版  字體: |||超大  

求教,怎样配置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:

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航