Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

My ErrorDocument redirect doesn't appear to be working!

Here is the bottom of my sites-available file:

    ...
    </Directory>

        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
</VirtualHost>

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

Any insight greatly appreciated,

share|improve this question
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.