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

My ErrorDocument redirect doesn't appear to be working!

Here is the bottom of my sites-available file:


        ErrorLog /var/log/apache2/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog /var/log/apache2/access.log combined

        ErrorDocument 403 /403.php
        ErrorDocument 404 /404.php

If you go to, the error page appears correctly, however, when you go to, I just get the bog standard 404 error...

Any insight greatly appreciated,

share|improve this question

Your ErrorDocument statements look correct. As you are testing this using an IP address you may be picking up the default configuration. Try connecting to the virtualhost using the server's name as defined by the ServerName directive.

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.