Welcome! Log In Create A New Profile

Advanced

Re: simple auth question for nested sections

B.R.
March 23, 2016 07:22AM
Why would you want to do that? Spaghetti configuration?
Some advice from Igor Sysoev: https://youtu.be/YWRYbLKsS0I
---
*B. R.*

On Wed, Mar 23, 2016 at 1:00 AM, Jonathan Vanasco <nginx@2xlp.com> wrote:

> apologies for the simple question, but i could only find the opposite
> situation in the list archives and I haven't had to reconfigure some of
> these routes in years!
>
> i have
>
> # works
> location /foo {
> proxy_pass http://127.0.0.1:6543;
> }
>
> I want to lock down /foo/admin with basic auth
>
> # works
> location /foo/admin {
> proxy_pass http://127.0.0.1:6543;
> auth_basic "Administrator Login";
> auth_basic_user_file /etc/nginx/_htpasswd/well-known;
> }
>
> Is there a syntax for nesting the two together, so the /foo/admin would
> inherit the /foo configuration without the need to redeclare everything?
>
> # something like
> location /foo {
> proxy_pass http://127.0.0.1:6543;
> location /foo/admin {
> auth_basic "Administrator Login";
> auth_basic_user_file
> /etc/nginx/_htpasswd/well-known;
> }
> }
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

simple auth question for nested sections

Jonathan Vanasco March 22, 2016 08:42PM

Re: simple auth question for nested sections

B.R. March 23, 2016 07:22AM

Re: simple auth question for nested sections

Francis Daly March 23, 2016 02:42PM

Re: simple auth question for nested sections

Jonathan Vanasco March 23, 2016 07:58PM

Re: simple auth question for nested sections

B.R. March 24, 2016 01:20PM

Re: simple auth question for nested sections

Maxim Dounin March 24, 2016 01:30PM

Re: simple auth question for nested sections

B.R. March 24, 2016 01:38PM

Re: simple auth question for nested sections

Jonathan Vanasco March 24, 2016 03:36PM

Re: simple auth question for nested sections

B.R. March 24, 2016 04:12PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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