【转】Apache Options Indexes FollowSymLinks详解
禁止显示Apache目录列表-Indexes FollowSymLinks
如何修改目录的配置以禁止显示 Apache 目录列表。
缺省情况下如果你在浏览器输入地址:
http://localhost:8080/
如果你的文件根目录里有 index.html,浏览器就会显示 index.html的内容,如果没有 index.html,浏览器就会显示文件根目录的目录列表,目录列表包括文件根目录下的文件和子目录。
同样你输入一个虚拟目录的地址:
http://localhost:8080/b/
如果该虚拟目录下没有 index.html,浏览器也会显示该虚拟目录的目录结构,列出该虚拟目录下的文件和子目录。
如何禁止 Apache 显示目录列表呢?
要禁止 Apache 显示目录结构列表,只需将 Option 中的 Indexes 去掉即可。
比如我们看看一个目录的目录配置:
<Directory "D:/Apa/blabla">
Options Indexes FollowSymLinks #---------->Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
你只需要将上面代码中的 Indexes 去掉,就可以禁止 Apache 显示该目录结构。用户就不会看到该目录下的文件和子目录列表了。
Indexes 的作用就是当该目录下没有 index.html 文件时,就显示目录结构,去掉 Indexes,Apache 就不会显示该目录的列表了。
第二种方法
解决办法:
1、编辑httpd.conf文件
vi ./conf/httpd.conf
找到如下内容:
?BR> <Directory “C:/Program Files/Apache2.2/htdocs”>
#
# Possible values for the Options directive are “None”, “All”,
# or any combination of:
Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that “MultiViews” must be named *explicitly* — “Options All”
# doesn’t give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be “All”, “None”, or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Order allow,deny
from:http://blog.sina.com.cn/s/blog_a03d702f0101133h.html
【转】Apache Options Indexes FollowSymLinks详解的更多相关文章
- Apache Options Indexes FollowSymLinks详解
禁止显示Apache目录列表-Indexes FollowSymLinks如何修改目录的配置以禁止显示 Apache 目录列表.缺省情况下如果你在浏览器输入地址: http://localhost:8 ...
- Apache服务器的Options 的 Indexes FollowSymLinks详解
禁止显示Apache目录列表 - Indexes FollowSymLinks 如何修改目录的配置以禁止显示 Apache 目录列表. 缺省情况下如果你在浏览器输入地址: http://localho ...
- Apache Options Indexes FollowSymLinks之讲解
禁止显示Apache目录列表-Indexes FollowSymLinks 如何修改目录的配置以禁止显示 Apache 目录列表. 缺省情况下如果你在浏览器输入地址: http://localhost ...
- Apache Options Indexes FollowSymLinks具体解释
禁止显示Apache文件夹列表-Indexes FollowSymLinks 怎样改动文件夹的配置以禁止显示 Apache 文件夹列表. 缺省情况下假设你在浏览器输入地址: http://loc ...
- Apache(httpd)详解
httpd详解(思维导图) 1. httpd服务 ASF 服务器类型 http服务器 应用程序服务器 httpd的特性 高度模块化 DSO机制 MPM httpd的并发响应模型 prefork wor ...
- apache httpd.conf 参数详解
由于网站需要,需要配置多个虚拟主机,但是apache主机的参数太多,记不住,下面做一下总结 归纳: ServerRoot:apache安装位置 Listen:服务器监听的端口号 LoadModule: ...
- Apache 的 httpd.conf 详解
ServerRoot “/usr/local“ ServerRoot用于指定守护进程httpd的运行目录,httpd在启动之后将自动将进程的当前目录改变为这个目录,因此如果设置文件中指定的文件或目录是 ...
- Ubuntu16.04+Apache虚拟主机配置详解
在window下,Apache的配置文件是httpd.conf,但在Linux下安装了Apache后发现其配置并不像window下那么简单,Linux下Apache将各个设置项分在了不同的配置文件中, ...
- Apache的httpd命令详解
Apache的httpd命令详解 来源:全栈开发者 发布时间:2012-01-03 阅读次数:10965 4 httpd.exe为Apache HTTP服务器程序.直接执行程序可启动服务器的服务. ...
随机推荐
- ERP存储过程的调用和树形菜单的加载(四)
引用:DAL:System.Data.SqlClient;System.Data; namespace CommTool { public class SqlComm { /// <summar ...
- 建置 POSTFIX 服务器
建置 POSTFIX 服务器 postfix 是除了 sendmail 以外 ,最被广泛采用的 Linux 邮件服务器,一般使用的观感不外乎两点: 一.安全:垃圾信过滤机制较聪明,就算什么都没设定,也 ...
- 在Silverlight中实施RESTful调用
在Silverlight中实施RESTful调用: http://book.51cto.com/art/201006/206314.htm http://bbs.csdn.net/topic ...
- 换个心境搞IT,在IT职场如何打拼?
刚进入IT这行时,我也是从程序员做起.尤其是前两三个月里,那种感觉就像时时刻刻处于备战状态一样.我是一个在对自己的要求方面有洁癖的人,在没有任何经验的状态下,只有坚持苦干,把下发的每件编程任务做好,才 ...
- 九、CCAction
之前介绍CCNode的时候说过,动作是指在特定时间内完成移动.缩放.旋转等操作的行为,节点可以通过运行动作来实现动画效果,这里的动作就是指CCAction对象,它有很多的子类,每个子类都封装了不同的动 ...
- linux的ftp使用方法
linux下常用FTP命令 1. 连接ftp服务器 以下是在服务器为Ubuntu环境下操作: (1)首先需要安装vsftp软件,已经安装的可跳过. 1.更新软件源 #apt-get update 2 ...
- nginx的upstream目前支持5种方式的分配(转)
nginx的upstream目前支持5种方式的分配 1.轮询(默认) 每个请求按时间顺序逐一分配到不同的后端服务器,如果后端服务器down掉,能自动剔除. 2.weight 指定轮询几率,weight ...
- Java 存储过程调用
//配置文件 private static ClientServiceConfigUtil configUtil = new ClientServiceConfigUtil("/Databa ...
- 11. Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). ...
- smartUpload组件批量下载
public class BatchDownloadServlet extends HttpServlet { public void doGet(HttpServletRequest request ...