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,
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 theServerName
directive.