Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

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 does not show 404.html.

Help greatly appreciated. ~JJ56.

share|improve this question

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.

<Directory /var/www/>
    AllowOverride fileinfo 
share|improve this answer
I added: <Directory /var/www/> AllowOverride ALL </Directory> to apache2.conf (there was no directory thing already). And it made no difference. – JJJollyjim Mar 23 '11 at 8:13
@JJ56: Ok, that was an example because I don't know your configuration. You should put the AllowOverride directive within the Directory block that makes sense to your configuration. Don't forget to restart you Apache too. – Iain Mar 23 '11 at 8:22
Where is the directory block? There is none in ports.conf, apache2.conf, or httpd.conf. I added the one to apache2.conf, but 404 still dosen't work. – JJJollyjim Mar 23 '11 at 8:27
@JJ56: Which OS/distro are you using ? – Iain Mar 23 '11 at 8:29
ubuntu server edition 10.10 – JJJollyjim Mar 24 '11 at 1:47

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.