Condensing Location Directives

arosolino nginx-forum at
Mon Jul 23 17:37:31 UTC 2012

I have this setup for my location directives

		location /css/ {
		location /js/ {

It seems a bit repetitive to me, is it possible to do something like

		location /css/, /js/ {

Where you can have one block process multiple locations, then the
variable $1, copies the location defined into the proxy_pass URL? I
might have about 10-20 and it would be easier to have one block then 20.

Posted at Nginx Forum:,228898,228898#msg-228898

More information about the nginx mailing list