First off, my server config is openSUSE 11.4 and my web server is apache 2.2.
I want to change the error files for the web server, but I can't get apache to understand that the error files are not relative to each virtual host!
I edited error.conf in /etc/apache and removed all the crap about localization (don't care about that) and added:
ErrorDocument 404 /srv/www/errors/404.html
Restart apache and then I try to access something that doesn't exist.
The output is:
Not Found The requested URL /notadocument was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
I check the error log and see this:
[Mon Aug 01 15:34:36 2011] [error] [client x.x.x.x] File does not exist: /home/andreas/www/notadocument
[Mon Aug 01 15:34:36 2011] [error] [client x.x.x.x] File does not exist: /home/andreas/www/srv
As you can see, apache tries to look in the directory of my vhost, not in the root of the server!
How do I fix this?