I have problem with nginx. What I want to achieve is to fake Basic Authentication like in this article: Nginx authentication with auth_request module But unfortunately when I do this "trick", nginx seems to go straight to the auth_request, totally ignoring auth_basic. Did anyone have this problem?
Regards, hohel
@Edit
It seems that satisfy start with auth_request instead of auth_basic. Is there some directive like
Satisfy any but first auth_basic;
@Edit 2
My code look something like this:
location / {
satisfy any;
auth_basic "Blabla";
auth_basic_user_file /path/to/empty/htpasswd/file;
auth_request /auth;
}
location = /auth {
Set headers and pass them to authentication service
}
@Edit 3 I'm still getting 500 internal error (because this from autentication service i've got access forbidden since no data is sent there), but i can see that in header of this page is:
WWW-Autenticate: "Basic realm="Blabla""