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;
}
location = /test.html {
expires 30s;
}
Unfortunately first location block is not working for me. My testing URL is domain.com/documents/23/582ad23330d63a078c967bc3/-1476160403/DUH/POI/2016-12-13/params?variable=my&var=0&many=other-variables&static=false .
As you can see URI is quite complex, that is why I want to use wildcard.
Any idea why it is not working and how to fix this?
Thank you in advance.