Quantcast
Channel: Nginx Forum - Nginx Mailing List - English
Viewing all articles
Browse latest Browse all 7229

No authentication prompt with if block (1 reply)

$
0
0
Authentication works fine if I don't include the if block but I'd like
to allow only a certain user access to this server block. I get a 403
in the browser without any prompt for authentication.

auth_basic "Authentication Required";
auth_basic_user_file htpasswd;
if ($remote_user != "myuser") {
return 403;
}

What am I doing wrong?

- Grant

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Viewing all articles
Browse latest Browse all 7229


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>