Welcome! Log In Create A New Profile

Advanced

Require a password for everything except one folder?

November 05, 2014 08:46PM
I'm trying to deny access to all locations on the server, unless the user has a specific IP address or enteres a password. This part is working. I'm also trying to add an exception, where any path starting with /Public is allowed by anyone with no password. I've tried to override it in a location block, but this doesn't seem to have any effect.


server {

...

satisfy any;
allow xx.xxx.xxx.xxx;
deny all;
auth_basic "Restricted";
auth_basic_user_file /x/y/z;

location ~* ^/Public {
satisfy any;
allow all;
}

location / {
try_files fake.html @apache;
}

}


I've also tried nesting like:

location / {
location ~* ^/Public {
satisfy any;
allow all;
}
try_files fake.html @apache;
}

But it always requires a password, even on Public. How can I override security on just the one folder?
Subject Author Posted

Require a password for everything except one folder?

nrahl November 05, 2014 08:46PM

Re: Require a password for everything except one folder?

Philipp November 06, 2014 02:04AM

Re: Require a password for everything except one folder?

nrahl November 06, 2014 09:51AM

Re: Require a password for everything except one folder?

Francis Daly November 06, 2014 01:48PM

Re: Require a password for everything except one folder?

nrahl November 06, 2014 04:47PM

Re: Require a password for everything except one folder?

Francis Daly November 06, 2014 05:24PM

Re: Require a password for everything except one folder?

nrahl November 06, 2014 05:35PM

Re: Require a password for everything except one folder?

Francis Daly November 06, 2014 06:10PM

Re: Require a password for everything except one folder?

nrahl November 06, 2014 07:29PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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