您的位置:首页 > 运维架构 > Apache

如何防止apache显示文件列表

2011-09-27 14:10 288 查看
如何防止apache显示文件列表

1.找到apache配置文件httpd.conf

2.设置

打开列目录功能:

<!--/path/to/directory是指你的apache设置的项目根路径,

如D:/Program Files/Apache Software Foundation/Apache2.2/htdocs-->

<Directory /path/to/directory>

Options +Indexes

</Directory>

关闭列目录功能:

<!--在其中找到Options选项,把Indexes去掉或是前面加上"-"号-->

<Directory /path/to/directory>

Options -Indexes

</Directory>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: