How do I exclude one folder from a try_files?

Francis Daly francis at daoine.org
Mon Jun 26 16:21:52 UTC 2017


On Sun, Jun 25, 2017 at 04:36:50PM -0400, Joergi wrote:

Hi there,

> location ^~ /wiki/images {
> 	# Separate location for /wiki/images
> 	root  /home/wiki/www;
> }
> 
> This is all I needed.

Good that you have an answer that works for you; thanks for confirming that.

> I thought the root would be inherited as it is set in
> the location / block already. Obviously this is not the case.

Correct, it is not. Inheritance goes from http to server, from server to
location, and from location to nested-location; and does not go between
parallel locations.

One request is handled in one location; and only the config in that
location, or inherited in to it, applies.

Cheers,

	f
-- 
Francis Daly        francis at daoine.org


More information about the nginx mailing list