try_files is broken with geoip?

Peter Volkov peter.volkov at gmail.com
Mon Mar 30 19:15:59 UTC 2015


On Mon, Mar 30, 2015 at 8:45 PM, itpp2012 <nginx-forum at nginx.us> wrote:

> Peter Volkov Wrote:
> [...]
> root /tmp/test/;
> "/tmp/test/test/1.ts" -> 404
>
> /tmp/test has follofing files:
> /tmp/test/dir2/test/1.ts - file
> /tmp/test/dir1/test - directory
>
> looks up /tmp/test/dir1/test/1.ts or if it not exist
> /tmp/test/dir2/test/1.ts file.
> [...]
>
> I think you first need to sort out WHERE stuff is (root+uri) as your 404 is
> valid against the other paths your have mentioned.
>

Sorry, I don't understood your answer. Could you explain what you mean,
please?

That was an example configuration that is a fragment from more complex one.
We use *try_files /dir1$uri /dir2$uri =404;* directive to lookup file first
in dir1 and if file does not exist in dir1/temp/, then lookup in dir2/temp.
so 1.ts could be either in dir1/test/1.ts or in dir2/test/1.ts. I think
it's quite valid configuration. The problem is that it does not work when
combined with geoip. So two questions are here:
1. Are there any problems with this config
2. Are there any workarounds/fixes for this problem?

--
Peter.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20150330/bf924998/attachment.html>


More information about the nginx mailing list