Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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!"
</Directory>

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

1 Answer 1

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

 
discard

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.