Welcome! Log In Create A New Profile

Advanced

Conditional http auth

December 03, 2010 03:58PM
Got this idea off IRC, but it looks like variables don't expand:

set $realm "enter your password";

if ($http_via ~* ".somehost.net") {
set $realm off;
}

auth_basic $realm;
auth_basic_user_file /etc/nginx/confs/htpasswd.test;

Any ideas on how to do conditional auth?

auth_basic and such is not allowed under "if" ... trying to figure out
some way to dynamically do this.

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

Conditional http auth

mike December 03, 2010 03:58PM

Re: Conditional http auth

Eugaia December 03, 2010 04:06PM

Re: Conditional http auth

mike December 03, 2010 04:08PM

Re: Conditional http auth

Boris Dolgov December 03, 2010 04:10PM

Re: Conditional http auth

mike December 03, 2010 04:14PM

Re: Conditional http auth

mike December 03, 2010 05:10PM

Re: Conditional http auth

Eugaia December 03, 2010 04:26PM

Re: Conditional http auth

agentzh December 04, 2010 06:24AM

Re: Conditional http auth

agentzh December 04, 2010 06:28AM

Re: Conditional http auth

Eugaia December 04, 2010 10:46AM

Re: Conditional http auth

mike December 04, 2010 06:04PM

Re: Conditional http auth

mike December 06, 2010 07:06AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 130
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready