如何从上市我的用户目录的内容停止阿帕奇 [英] How to stop Apache from listing the contents of my user directories

查看:126
本文介绍了如何从上市我的用户目录的内容停止阿帕奇的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,我跑在我的网站一些渗透测试软件并惊讶于它向大家报告,我的目录列表之一是公开访问。

I recently ran some penetration testing software on my web site and was surprised for it to report that one of my directory listings was publicly accessible.

这是root用户是可用的目录。

It is the directory of the root user which is available.

http://www.example.com/~root/

结果在本页面内容:

Index of /~root

    * Parent Directory
    * cgi-bin/

平台:我在Linux上创建PHP网站,与Symfony的使用Apache

这是东西,我可以通过Apache配置?

推荐答案

您可以创建在该目录中的的.htaccess 文件,或有一个 <&目录GT; ...< /目录> 在Apache配置块指定:

You could create a .htaccess file in that directory, or have a <directory>...</directory> block in your Apache configuration that specifies:


Options -Indexes

请参阅更多细节Apache的选项指令文档

这篇关于如何从上市我的用户目录的内容停止阿帕奇的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆