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 am trying to set a custom error document in an alias.

Alias /f1 "/media/data/www/f1"
<Directory "/media/data/www/f1">
        AddHandler cgi-script .cgi .pl
        Options Includes Indexes MultiViews FollowSymLinks ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
        ErrorDocument 404 "Something was not found!"

This absolutely does not seem to work! The same directives in a virtual host works just fine. What am I doing wrong?

I could not find any reference that states that I cannot have custom error messages in an Alias Section.

share|improve this question
I indeed had wwww instead of www Thanks to @Imo for pointing it out. – Lord Loh. Apr 19 '12 at 2:24
up vote 3 down vote accepted

I have tested this for you and it worked fine. It looks like you've got a typo in your directory statement. (wwww instead of www)

share|improve this answer
Thank you! As lame as it is. The typo of wwww was the only thing that stopped this from working :-) Phew! I wasted 2 hours trying to troubleshoot this before surrendering it to ServerFault. – Lord Loh. Apr 19 '12 at 2:22
It happens to us all. Often takes someone else fresh to the problem to spot it. :) – Imo Apr 19 '12 at 2:50

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.