3

I am trying to set a custom error document in an alias.

Alias /f1 "/media/data/www/f1"
<Directory "/media/data/wwww/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.

1
  • I indeed had wwww instead of www Thanks to @Imo for pointing it out.
    – Lord Loh.
    Apr 19, 2012 at 2:24

1 Answer 1

3

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)

2
  • 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, 2012 at 2:22
  • It happens to us all. Often takes someone else fresh to the problem to spot it. :)
    – Imo
    Apr 19, 2012 at 2:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .