Wildcard in location directive
Francis Daly
francis at daoine.org
Tue Nov 15 12:37:59 UTC 2016
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;
> }
> location = /test.html {
> expires 30s;
> }
>
> 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
"location" matches from the / after the domain name, to just before the
first # or ?
For this request, that is from /documents to /params
So of these, the second is the location that nginx should use.
f
--
Francis Daly francis at daoine.org
More information about the nginx
mailing list