views:

18

answers:

0

Heya, how goes it? I'm having an issue with apache2. I have a bunch of sites working off virtual hosts on an apache2 box, and a few of them have apache auth setup. When it fails, I wanted to customize the error page (401?), and so I tried throwing in:

ErrorDocument 401 "Woops"

into the rule, but it didn't work. To make sure I tried throwing in 400, 401, 402, 403, 404, 500 and 501 document codes, and then to make even more sure, I through them into the spec for the account.

Note: I don't want to throw the rules in the htaccess file for the site since it wouldn't be hit as apache2.conf is doing the authentication. Also, I read "Therefore, if you use an ErrorDocument 401 directive then it must refer to a local document." in the apache specs "http://httpd.apache.org/docs/current/mod/core.html#errordocument" but even specifying something like /var/www/test.txt didn't work :(

Any thoughts would be appreciated. Thanks. Oliver