Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 am currently trying to setup 2 different sets of Error documents for separate folders within a website.

I have 2 folders within the root of a site:


Any requests that return 404's or 403's within the demo folder needs to load one set of pages for the Apache errordocuments, eg.

ErrorDocument 404 /statuses/demo-404.html
ErrorDocument 403 /statuses/demo-403.html

And the live needs to go to similarly name files.

ErrorDocument 404 /statuses/live-404.html
ErrorDocument 403 /statuses/live-403.html

So far I have tried placing an .htaccess file in both directories with the ErrorDocument directives setup pointing to the specific files, the 404 works fine and references the correct page. However, the 403s do not work and revert to the server default when trying to access forbidden folders within the demo directory, the logs indicate the following:

[Wed Jun 16 04:47:44 2010] [crit] [client] (13)Permission denied: /home/abstract/public_html/demo/xxx/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

Is this correct? Would apache revert to default because it is trying to look for the htaccess in a folder it doesn't have permission in? Why wouldn't it work it's way back through the folder tree? Can I make it do this?

share|improve this question
What does the system log say? – Ignacio Vazquez-Abrams Jun 16 '10 at 10:09
Have you tried to place these directives in <Directory> context? As mentioned in documentation here: – mkudlacek Jun 16 '10 at 10:12
@mkudlacek: He's put them in .htaccess, which is acceptable. – Ignacio Vazquez-Abrams Jun 16 '10 at 10:14
Did you ever get this working? – Nathan V Nov 30 '12 at 5:14
I believe that I resolved this with some kind of work around. What it was, I can't remember unfortunately. – navitronic Nov 30 '12 at 5:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.