Welcome! Log In Create A New Profile

Advanced

Re: Enforcing authentication requests for all resources under specific path

Francis Daly
March 29, 2012 04:30PM
On Thu, Mar 29, 2012 at 07:21:05PM +0200, Jan Wrobel wrote:

Hi there,

> In my case this is not too good option. I need authentication layer
> configuration to be independent from applications configuration. In

Because of the way nginx configuration works, they can't be completely
independent.

But you could try nesting locations:

location /protected/ {
auth_request etc...

location /protected/blog {
blog config...
}

location ~ png {
png config...
}

}

(And of course you'll want no top-level regex locations; but that's good
practice anyway.)

Quick testing suggests that the auth request module does inherit these
configurations.

f
--
Francis Daly francis@daoine.org

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

Enforcing authentication requests for all resources under specific path

Jan Wrobel March 29, 2012 10:34AM

Re: Enforcing authentication requests for all resources under specific path

Igor Sysoev March 29, 2012 10:46AM

Re: Enforcing authentication requests for all resources under specific path

Jan Wrobel March 29, 2012 01:22PM

Re: Enforcing authentication requests for all resources under specific path

Francis Daly March 29, 2012 04:30PM

Re: Enforcing authentication requests for all resources under specific path

Jan Wrobel March 29, 2012 04:54PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 184
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