March 30, 2015 05:11PM
Peter Volkov Wrote:
-------------------------------------------------------
> On Mon, Mar 30, 2015 at 8:45 PM, itpp2012 <nginx-forum@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?

The 404 is about /tmp/test/test/1.ts (root+uri) however every other path you want to test for is not in there, so its going to fail always, maybe if you set root /tmp/; try_files could work.

> 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.

You could do a fallback 'try_files $uri $uri/ @fallback;' and then test again with a different root setting.

---
nginx for Windows http://nginx-win.ecsds.eu/
Subject Author Posted

try_files is broken with geoip?

Peter Volkov March 30, 2015 01:28PM

Re: try_files is broken with geoip?

itpp2012 March 30, 2015 01:45PM

Re: try_files is broken with geoip?

Peter Volkov March 30, 2015 03:18PM

Re: try_files is broken with geoip?

itpp2012 March 30, 2015 05:11PM

Re: try_files is broken with geoip?

Francis Daly March 30, 2015 03:20PM

Re: try_files is broken with geoip?

Peter Volkov March 30, 2015 03:52PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 291
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready