Apache 在一个文件夹中启用目录索引

Apache 在一个文件夹中启用目录索引,apache,Apache,我无法管理httpd.conf以便在一个特定文件夹中启用目录索引: <Directory /> Options FollowSymLinks AllowOverride All Order deny,allow Deny from all IndexIgnore * 选项如下符号链接 允许超越所有 命令拒绝,允许 全盘否定 IndexIgnore* 选项如下:符号链接+索引 允许超越所有 命令允许,拒绝 通融 怎么了?我想你想要的是: <Directory />

我无法管理httpd.conf以便在一个特定文件夹中启用目录索引:

<Directory />
Options FollowSymLinks
AllowOverride All
Order deny,allow
Deny from all
IndexIgnore *

选项如下符号链接
允许超越所有
命令拒绝,允许
全盘否定
IndexIgnore*


选项如下:符号链接+索引
允许超越所有
命令允许,拒绝
通融

怎么了?

我想你想要的是:

<Directory />
  Options FollowSymLinks -Indexes
  AllowOverride All
  Order deny,allow
  Deny from all
</Directory>

<Directory "/srv/http/testsite/images">
  Options FollowSymLinks +Indexes
  AllowOverride All
  Order allow,deny
  Allow from all
</Directory>

选项下面的符号链接-索引
允许超越所有
命令拒绝,允许
全盘否定
选项如下:符号链接+索引
允许超越所有
命令允许,拒绝
通融

它也可能不起作用,这取决于您希望成为索引文件的~what~。。。您应该能够将此内容添加到您的.htaccess中

DirectoryIndex index.html index.html.var index.shtml index.php index.htm index.cfm index.cfml

我相信index.htm不是默认值,可能是缺少的。

IndexIgnore*
这将忽略所有用于索引的文件是的,但我设置了允许重写和在选项中添加+索引的权限。。。错误吗?AllowOverride用于确定哪些参数可以在.htaccess文件中被重写。它不会撤消之前在配置中设置的设置。那么我需要在要索引的目录的目录部分修改什么?
DirectoryIndex index.html index.html.var index.shtml index.php index.htm index.cfm index.cfml