LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1415|回复: 3

如何允许apache2列出文件目录?

[复制链接]
发表于 2004-10-30 10:18:04 | 显示全部楼层 |阅读模式
###
### Each directory to which Apache has access, can be configured with respect
### to which services and features are allowed and/or disabled in that
### directory (and its subdirectories).
###
### First, we configure the "default" to be a very restrictive set of
### permissions.  Also, for security, we disable indexes globally.
###
### Restricted set of options:
###
<Directory />
  Options -All -Multiviews
  AllowOverride None
  <IfModule mod_access.c>
    Order deny,allow
    Deny from all
  </IfModule>
</Directory>


Options 这一段中已经用了All,需要把 All 改成 Indexes 吗?这一行的两个破折号是什么意思啊?
发表于 2004-10-30 12:22:51 | 显示全部楼层

回复: 如何允许apache2列出文件目录?

最初由 nothing9 发表
###
### Each directory to which Apache has access, can be configured with respect
### to which services and features are allowed and/or disabled in that
### directory (and its subdirectories).
###
### First, we configure the "default" to be a very restrictive set of
### permissions.  Also, for security, we disable indexes globally.
###
### Restricted set of options:
###
<Directory />
  Options -All -Multiviews
  AllowOverride None
  <IfModule mod_access.c>
    Order deny,allow
    Deny from all
  </IfModule>
</Directory>


Options 这一段中已经用了All,需要把 All 改成 Indexes 吗?这一行的两个破折号是什么意思啊?

那个破折号是减号!
加上Indexes
 楼主| 发表于 2004-11-6 22:45:46 | 显示全部楼层
最初由 小锁 发表
那个破折号是减号!
加上Indexes


Indexes加在哪里?能写出完整的那一行吗?有经验的请回帖。谢!
发表于 2004-11-7 01:23:02 | 显示全部楼层
<Directory /home/*/public_html>
    AllowOverride All
    Options MultiViews Indexes Includes FollowSymLinks
    <IfModule mod_access.c>
      Order deny,allow
      Deny from all
      Allow from 127.0.0.1
    </IfModule>
</Directory>
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表