error_page and 401 code

d2 nginx-forum at
Tue Dec 1 16:08:29 MSK 2009


Recently I had a issue with auth module. I set one location to use basic authentication and tried to login via web browser but I couldn't. There was a error message logged: 

"no user/password was provided for basic authentication, client: "

immediately and no popup windows posted by web browser. I started to review my config file and realized that error_page for 401 code was set to use full address, like that: 

error_page 401

Setting this page to use "relative path" 

error_page 401 /error/index.html

actually solved the issue. 

Can anyone explain, why  401 code can not be used with full webserver's address? (as far as I can see, this is the only error code which cause troubles).

Posted at Nginx Forum:,27040,27040#msg-27040

More information about the nginx mailing list