Re: misunderstood regex location

2014-05-07 Thread B.R.
On Tue, May 6, 2014 at 8:39 PM, dcaillibaud wrote: > > > 2) (I guess E but I'm not so sure), this can also be a pitfall > > example (how > > > complicating things can lead to unexpected behaviour) > > > > > > location /images/ { > > > location ~* \.(gif|jpg|jpeg)$ { > > > [ configuratio

Re: misunderstood regex location

2014-05-06 Thread dcaillibaud
this sentence is not so clear... > I understand > that all first level are evaluated to see if one branch need to be > explored deeper, but it's not so obvious. ...I mean : I understand that all first level selectors are compared to see which block need to be evaluated deeper, but it's not so o

Re: misunderstood regex location

2014-05-06 Thread dcaillibaud
> > 2) (I guess E but I'm not so sure), this can also be a pitfall > example (how > > complicating things can lead to unexpected behaviour) > > > > location /images/ { > > location ~* \.(gif|jpg|jpeg)$ { > > [ configuration D ] > > } > > } > > > > location ~* \.(gif|jpg|jpeg)$ { > >

Re: misunderstood regex location

2014-05-06 Thread B.R.
On Tue, May 6, 2014 at 5:03 PM, dcaillibaud wrote: > I understand my mistake, thanks to both of you. > > May I suggest to insist on this in > http://nginx.org/en/docs/http/ngx_http_core_module.html#location, with a > remark on the fact that ^~ is not usable with a regex, for example with > > synt

Re: misunderstood regex location

2014-05-06 Thread dcaillibaud
I understand my mistake, thanks to both of you. May I suggest to insist on this in http://nginx.org/en/docs/http/ngx_http_core_module.html#location, with a remark on the fact that ^~ is not usable with a regex, for example with syntax: location [ = | ^~ ] uri { ... } location ~ | ~* reg

Re: misunderstood regex location

2014-05-05 Thread Igor Sysoev
On May 6, 2014, at 2:38 , dcaillibaud wrote: > Hi, > > I understood that prefix location was read, then regex location and it stops > on a ^~ match > > Why with this config > > location / { > location ~ .+\.(js|css|ico|png|gif|jpg|jpeg|pdf|zip|html|htm)$ { > expires

Re: misunderstood regex location

2014-05-05 Thread Francis Daly
On Mon, May 05, 2014 at 06:38:45PM -0400, dcaillibaud wrote: Hi there, > location ^~ "/banniere_rotative/.*\.css$" { > > doesn't (inside prefix location or not) > > What's the obvious mistake I made in my regex ? ^~ is a prefix match, not a regex match. http://nginx.org/r/location f

misunderstood regex location

2014-05-05 Thread dcaillibaud
Hi, I understood that prefix location was read, then regex location and it stops on a ^~ match Why with this config location / { location ~ .+\.(js|css|ico|png|gif|jpg|jpeg|pdf|zip|html|htm)$ { expires 25h; } } location ^~ /banniere_rotative/