Apache 目录索引不起作用,但 index.html 可以

Apache 目录索引不起作用,但 index.html 可以

2 个小时,2 个小时都在为此奋斗。www.domain.com/index.html 可以工作,但是 www.domain.com 显示索引,如果我单击 index.html,什么也不会发生。

这是虚拟主机。

NameVirtualHost *:80
<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        ServerName newsletter.domain.de
        DocumentRoot /home/folder/domain
        DirectoryIndex index.html index.htm
        <Directory />
                Order Deny,Allow
                Deny from All
        </Directory>
        <Directory /home/folder/domain/ >
                Options Indexes FollowSymlinks MultiViews
                AllowOverride All
                Order Allow,Deny
                Allow from all
        </Directory>

        CustomLog /var/log/apache2/domain.access.log combined
        ErrorLog /var/log/apache2/domain.error.log
</VirtualHost>

这是 .htaccess

<IfModule mod_dir.c>
DirectoryIndex index.html index.htm
</IfModule>

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>

如果我禁用一切:重写等,它仍然不起作用。但服务器中的其他域运行正常。我肯定错过了什么。

日志说:

91.64.XXX.XXX - - [23/Sep/2014:14:15:10 +0200] "GET / HTTP/1.1" 200 674 "http://http://newsletter.domain.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.78.2 (KHTML, like Gecko) Version/7.0.6 Safari/537.78.2"
91.64.XXX.XXX - - [23/Sep/2014:14:15:10 +0200] "GET /icons/blank.gif HTTP/1.1" 304 188 "http://newsletter.domain.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.78.2 (KHTML, like Gecko) Version/7.0.6 Safari/537.78.2"
91.64.XXX.XXX - - [23/Sep/2014:14:15:10 +0200] "GET /icons/text.gif HTTP/1.1" 304 188 "http://http://newsletter.domain.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.78.2 (KHTML, like Gecko) Version/7.0.6 Safari/537.78.2"

相关内容