allow access on a sublocation

Jonathan Matthews contact at jpluscplusm.com
Tue Aug 6 14:22:52 UTC 2013


On 6 Aug 2013 15:08, "Greg" <greg at 2lm.fr> wrote:
>
> 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.

Just checking you're aware that this only matches "/allowed/" by itself and
nothing below it.

Is that what you meant? Is that what you're testing?

J
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20130806/435b23d3/attachment.html>


More information about the nginx mailing list