Status 401 Behaviour Issue

Payam Chychi pchychi at
Sat Mar 19 22:31:00 MSK 2011

Do u mean a 403?

On 3/19/11, Dayo <nginx-forum at> wrote:
> Hi all.
> I noticed a certain behaviour of the 401 status code response I will like to
> change.
> Firstly, in Apache, there is an html page for 401 that is defined in the
> error_page equivalent. When the request for a protected directory comes in,
> the user gets the form for the authentication and only if the authentication
> fails is that html page served.
> With Nginx however, if I define an html page error_page for 401, this gets
> served every time a user requests the protected directory and there is no
> opportunity to fill in the authentication details.
> Is it possible to set it up such that it behaves like Apache does? I.E. only
> return the html error_page if the authentication fails? This seems like a
> better implementation to me.
> Running 0.8.54
> Thanks
> Posted at Nginx Forum:
> _______________________________________________
> nginx mailing list
> nginx at

Sent from my mobile device

Payam Tarverdyan Chychi
Network Security Specialist / Network Engineer

More information about the nginx mailing list