Nginx location rule for Wordpress Multisite in subdirectories

Francis Daly francis at daoine.org
Thu Aug 30 21:27:37 UTC 2012


On Tue, Aug 28, 2012 at 04:12:52PM -0400, Ian Evans wrote:
> On 27/08/2012 4:47 PM, Francis Daly wrote:

Hi there,

> >nginx locations can be "regex" or "prefix". 
> 
> Is there a specific order the locations have to go in? /blogs before 
> /blogs/blog or vice-versa?

No.

"prefix" locations (location, location ^~, and location =; although
the last isn't really a prefix) have the longest matching one chosen,
independent of the order in the config file.

That's one of the reasons why it is good to avoid "regex" locations
if possible.

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list