Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

migrated from Aug 2 '11 at 11:22

This question came from our site for computer enthusiasts and power users.

I'm guessing from what you said above that you are trying to point to files not served up by apache and are instead just locally accessible?

If that's the case then I can provide you with a partial answer. What you will probably want to do is add a type directive to your vhosts file... More info on Directory. That should allow Apache to access that location. You might even want to alias the directory as well.

Like I said it's a partial answer as it isn't something I've ever tried before, but since there aren't any other answers here yet... hopefully this helps you get in the right direction.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.