0

2 hours, 2 hours struggling with that. www.domain.com/index.html works, but www.domain.com show indexes, if i click on the index.html, nothing happens.

This is the virtuahost.

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>

And this the .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>

If i disable EVERYTHING: rewrites and so on, it still doest work. But other domains in the server work flawlessly. Definitely im missing something.

Logs says:

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"
PsySkeletor
  • 181
  • 1
  • 13
  • 2
    I don't understand... you got both an index.html and an index.htm file in the same directory? Are you sure you want to keep the Indexes option on? And, did you check the permissions of those files? What's your OS? – stoned Sep 23 '14 at 12:26
  • Now, as you can see i have index.html and another index.htm just in case. But the main file named is index.html. I will edit que question to make it clear. Permissions are ok since if i look for something that doesn't exist, the rewrite rule redirect my request to newsletter.domain.com/index.html and it works. And if i disable indexes i got a "server forbidden". – PsySkeletor Sep 23 '14 at 20:36
  • With permissions I mean file permissions, which are independent from Apache settings. Still waiting for you to report them. I'd also, as asked, like to know your OS. Plus, the error log would be useful compared to the access log you posted. You shouldn't get a "server forbidden" error disabling the indexes(which by itself is a possible security flaw), it indeed seems to point to some file permission problem. – stoned Sep 24 '14 at 08:54
  • Your log is erroring on newsletter.domain.com. Your ServerName is set to newletter.domain.de. Is that an artifact of genericizing the question, or is one really .com and the .de? – unkilbeeg Sep 29 '14 at 22:00

0 Answers0