2011-08-01 19 views
3

我不能爲了管理httpd.conf中啓用目錄索引在一個特定的文件夾中:啓用目錄索引一個文件夾

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

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

有什麼不對?

+0

'IndexIgnore *'這將*忽略*所有文件索引 – PtPazuzu

+0

是的,但我設置了Allowoverride重寫和添加+選項索引...是不是錯誤? –

+0

AllowOverride用於確定可以在.htaccess文件中覆蓋哪些參數。它不會撤銷早些時候在配置中設置的設置。 – PtPazuzu

回答

2

我想你想的是:

<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> 
0

它也不能依賴於工作〜麼〜你希望成爲一個索引文件......你應該可以的東西添加到您。 htaccess以及

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

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

相關問題