apache - Custom error page in Apache2 for 401 -


here's relevant part of .htaccess file:

authuserfile  /var/www/mywebsite/.htpasswd authgroupfile /dev/null authname  protected authtype basic require valid-user  errordocument 400 /var/www/errors/index.html errordocument 401 /var/www/errors/index.html errordocument 403 /var/www/errors/index.html errordocument 404 /var/www/errors/index.html errordocument 500 /var/www/errors/index.html 

docuement root set /var/www/mywebsite/web, it's on of many vhosts. can navigate index.html page.

all i'm seeing generic apache 401 page, thoughts.

edit: error message in browser:

authorization required

this server not verify authorized access document requested. either supplied wrong credentials (e.g., bad password), or browser doesn't understand how supply credentials required.

additionally, 401 authorization required error encountered while trying use errordocument handle request. apache/2.2.9 (debian) php/5.2.6-1+lenny8 suhosin-patch server @ www.dirbe.com port 80

make sure /var/www/errors readable apache user , include in apache configuration:

<directory /var/www/errors>   order allow,deny   allow </directory> 

Comments