I have a .htaccess
file in /var/www
, the contents of which is:
ErrorDocument 404 /404.html
In apache2.conf
AccessFileName
is .htaccess
, and AllowOverride
does not exist. For some reason, visiting example.com/anything
does not show 404.html
.
You will need to configure a suitable AllowOverride setting in your configuration file to get ErrorDocument to work. The override you require is
fileinfo
e.g.