stop automatic trailing slash addition

Valentin V. Bartenev vbart at nginx.com
Sun Dec 14 00:25:52 UTC 2014


On Saturday 13 December 2014 15:53:32 neubyr wrote:
[..]
> Thank you for pointing out debugging log. I think that helped in explaining
> this behavior.
> 
> It seems like nginx is adding slash as uri name matches with corresponding
> directory and not file name. I thought nginx will return 404 in this case,
> but it adds trailing slash when matching directory is found.
> 
> After adding trailing slash uri becomes /test/ and hence it matches next
> location block.
> 
> Hope my understanding of debugging log is correct. Let me know if I  am
> missing anything.
[..]

>From the debug log it looks like that you have the try_files directive
in your "/test" location block.  And the config you have mentioned before
isn't the one you are actually using.

  wbr, Valentin V. Bartenev



More information about the nginx mailing list