Grant
February 07, 2014 01:06PM
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
Subject Author Posted

No authentication prompt with if block

Grant February 07, 2014 01:06PM

Re: No authentication prompt with if block

Maxim Dounin February 07, 2014 02:10PM

Re: No authentication prompt with if block

Grant February 08, 2014 11:46AM

Re: No authentication prompt with if block

Maxim Dounin February 08, 2014 04:06PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 119
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready