Re: allow access on a sublocation

2013-08-06 Thread Francis Daly
On Tue, Aug 06, 2013 at 04:07:48PM +0200, Greg wrote: Hi there, > this configuration does not work as expected : In what way does it fail for you? When I "allow 127.0.0.3/32", I am challenged http 401 for "curl -i http://127.0.0.1/normal/ok";, but get the file content from both "curl -i http://

Re: allow access on a sublocation

2013-08-06 Thread Greg
Le 06/08/2013 16:50, Reinis Rozitis a écrit : >> this configuration does not work as expected : >> server { >>satisfy any; > > If that is all your configuration (no extra location blocks) then just > include the rules inside location / {} like: > > True, but I can't do that as "location / {}"

Re: allow access on a sublocation

2013-08-06 Thread Reinis Rozitis
Document sans nom> True, but I can't do that as "location / {}" is in a common config included by many other vhosts. Then to clarify - you want to deny the access to all the "other vhosts" or just one? If one - per http://nginx.org/en/docs/http/server_names.html you can leave the current con

Re: allow access on a sublocation

2013-08-06 Thread Reinis Rozitis
this configuration does not work as expected : server { satisfy any; If that is all your configuration (no extra location blocks) then just include the rules inside location / {} like: server { location / { satisfy any; auth_basic "DING DING

Re: allow access on a sublocation

2013-08-06 Thread Jonathan Matthews
On 6 Aug 2013 15:35, "Greg" wrote: > > It match evrything that _starts_ with /allowed/ , right ? Yes it does; I had a brain-fart. Personally I omit the ^~ unless I have a situation that definitely requires it, as it's clearer without it IMHO. YMMV. J

Re: allow access on a sublocation

2013-08-06 Thread Greg
Le 06/08/2013 16:22, Jonathan Matthews a écrit : > 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? > > It match evrything that _starts_ with /allowed/ , right ? -- Greg Document sans nom

Re: allow access on a sublocation

2013-08-06 Thread Jonathan Matthews
On 6 Aug 2013 15:08, "Greg" 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 C

allow access on a sublocation

2013-08-06 Thread Greg
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; }