Welcome! Log In Create A New Profile

Advanced

Re: Trying to show http password for only certain IP blocks

Maxim Dounin
November 11, 2010 07:26PM
Hello!

On Thu, Nov 11, 2010 at 03:30:19PM -0800, Michael Shadle wrote:

> Below is our (scrubbed) configuration...
>
> What we are trying to do is show an HTTP password prompt for people
> from IPs that are not "whitelisted"
>
> We had found a blog post that had said this was possible using
> allow/deny/satisfy but it's not working.
>
> Basically, can we get it so that it will show an HTTP auth prompt for
> all IPs other than:
>
> 10.10.10.0/24
> 10.10.11.0/24
>
> ?

[...]

> satisfy any;
> deny all;

- deny all;
allow 10.10.10.0/24;
allow 10.10.11.0/24;
+ deny all;

Access module instructions are executed in order, so "deny all"
specified first will just deny all. If you want to allow some
addresses - you have to do "allow" before "deny all".

> allow 10.10.10.0/24;
> allow 10.10.11.0/24;
> auth_basic "test”
> auth_basic_user_file /etc/nginx/confs/htpasswd.test;
> }

Maxim Dounin

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

Trying to show http password for only certain IP blocks

mike November 11, 2010 06:34PM

Re: Trying to show http password for only certain IP blocks

Maxim Dounin November 11, 2010 07:26PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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