allow access on a sublocation

Greg greg at 2lm.fr
Tue Aug 6 14:07:48 UTC 2013


Hi,

this configuration does not work as expected :

server {
    satisfy any;
    auth_basic "DING DING SONG";
    auth_basic_user_file /etc/apache2/htpasswd;
    allow from CIDR;
    allow from CIDR;
    allow from CIDR;
    allow from CIDR;

    location ^~ /allowed/ {
        allow all;
    }

    deny all;
}

I short, I want to disallow access on my website, only some IPs can
access, except for /allowed/ which is open.

What's wrong ?

Greg




More information about the nginx mailing list