Enabling directory indexing in one folder
I can't manage httpd.conf in order to enable directory index in one specific folder:
<Directory />
Options FollowSymLinks
AllowOverride All
Order deny,allow
Deny from all
IndexIgnore *
<Directory "/srv/http/testsite/images">
Options FollowSymLinks +Indexes
AllowOverride All
Order 开发者_如何学Pythonallow,deny
Allow from all
</Directory>
What's wrong?
What I think you want is:
<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>
It may also not be working depending on ~what~ you expect to be an index file... you should be able to add something this to your .htaccess as well
DirectoryIndex index.html index.html.var index.shtml index.php index.htm index.cfm index.cfml
I believe index.htm is NOT a default, may be what is missing.
精彩评论