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