Re: Wildcard in location directive

2016-11-15 Thread piotr.pawlowski
Thanks. This is exactly what I'have figured out and forgot to post here. Bottom line is that my approach, due to lack of knowledge, was wrong. static=false is a parameter which is not taken into account when NginX is making regex for 'location' block. 'Query string' is something I had to focus on.

Re: Wildcard in location directive

2016-11-15 Thread Francis Daly
On Tue, Nov 15, 2016 at 08:03:32AM -0500, piotr.pawlowski wrote: Hi there, > OK, so do you know how to achieve my goal? If my guess at what your goal is is correct, the following might work: == location ^~ /documents/ { if ($arg_static = false) { proxy_pass http://upstream;

Re: Wildcard in location directive

2016-11-15 Thread piotr.pawlowski
OK, so do you know how to achieve my goal? Posted at Nginx Forum: https://forum.nginx.org/read.php?2,270949,270952#msg-270952 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: Wildcard in location directive

2016-11-15 Thread Francis Daly
On Tue, Nov 15, 2016 at 07:04:42AM -0500, piotr.pawlowski wrote: Hi there, > location ~ /documents/(.*)static=false$ { > proxy_pass http://upstream; > } > > location /documents { > try_files $uri /test.html; > } > l

Wildcard in location directive

2016-11-15 Thread piotr.pawlowski
Gents, I am trying to setup location block which has wildcard 'inside' regex. Here is what I think should work: location ~ /documents/(.*)static=false$ { proxy_pass http://upstream; } location /documents { try_files $uri /test.html