3

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.

Lord Loh.
  • 1,049
  • 3
  • 15
  • 24

1 Answers1

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)

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