Welcome! Log In Create A New Profile

Advanced

Re: Require a password for everything except one folder?

Francis Daly
November 06, 2014 06:10PM
On Thu, Nov 06, 2014 at 05:35:09PM -0500, nrahl wrote:

Hi there,

> The expected response is a password prompt on all locations, unless the IP
> matches, in which case allow, or the path starts with /Public, in which case
> allow.

nginx config is based on "one request is handled in one location";
but one http request is not necessarily just one nginx request.

I suspect that if you put the configuration that you want, in the location
that you want, things will Just Work. Trying to have one location both
require and not require a password, is probably the root of the issue.

> location ^~ /Public { # Disable access restriction on this location
> auth_basic off;

(You will want to disable "deny all" or "satisfy any" here too.)

> try_files fake.html @apache;

Instead of that try_files, can you just "proxy_pass" directly?

Either copy-paste the config ending with

proxy_pass http://127.0.0.1:8080;

or do "include the-proxy-pass-file;"?

> }
>
> location / { # All other requests get proxy passed to apache.
> try_files fake.html @apache;

Same there, but that one is not directly influenced by the "satisfy
any" thing.

Good luck with it,

f
--
Francis Daly francis@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
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: 171
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