VirtualHost contains an
<VirtualHost *:80> ServerName test DocumentRoot /var/www/html/test/ ErrorDocument 404 /error/404.txt </VirtualHost>
/var/www/html/test/error/404.txt does exist.
When trying to access a non-existing file, I get an error-in-a-error message from apache:
The requested URL /foo was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
The error log contains:
[error] File does not exist: /var/www/html/test/foo [error] File does not exist: /var/www/error/404.txt
Why does apache make the error document path relative to
/var/www (apache user's home dir) instead of relative to the virtual host's
DocumentRoot, as described in the docs?
URLs can begin with a slash (/) for local web-paths (relative to the DocumentRoot), ...
This happens with Apache 2.2 on CentOS 6.7.