Welcome! Log In Create A New Profile

Advanced

Re: try_files problem

Maxim Dounin
July 28, 2009 05:12AM
Hello!

On Tue, Jul 28, 2009 at 12:59:15PM +0400, Maxim Dounin wrote:

> Hello!
>
> On Tue, Jul 28, 2009 at 01:43:57AM -0400, holstebm wrote:
>
> > I can't get the following to work and, after reading and re-reading all the documentation I could find, am not sure if this is a bug or a restriction.
> >
> > try_files @nocache @cache;
> >
> > The thought here is @nocache will succeed if a cookie is present and @cache will succeed if not.
>
> Try_files doesn't work this way. It checks *files* and uses
> fallback in no one was found:
>
> try_files /file1 /file2 @fallback;
>
> Looks like
>
> http://wiki.nginx.org/NginxHttpCoreModule#try_files
>
> has wrong description and should be re-translated from scratch.

Just a note: it looks like description was changed to wrong one by
Merlincorey at 2009-07-14. I've reverted this change and at least
it doesn't plain wrong now.

Note that original documentation has much more examples and covers
a bit more features of try_files (testing directories, ability to
return error code in 0.7.51+). So we still need good translation
here.

Maxim Dounin

> For a while use original documentation in Russian:
>
> http://sysoev.ru/nginx/docs/http/ngx_http_core_module.html#try_files
>
> (try google translate if you have problems with Russian).
>
> Maxim Dounin
>
> >
> > The problem is, the first argument seems to be ignored. I say that because, if I change JUST the try_files without changing any other lines in the configuration I get two different results. In each case, the final argument in the try_files is always reached...cache displaying correctly when there is no cookie and a blank page if there is a cookie while try_files @cache @nocache displays correctly when there is a cookie but a blank page if there is not.
> >
> > So is this a restriction or a bug on using internal locations in try_files?
> >
> > Posted at Nginx Forum: http://forum.nginx.org/read.php?2,4504,4504#msg-4504
> >
> >
Subject Author Posted

try_files problem

holstebm July 28, 2009 01:43AM

Re: try_files problem

Maxim Dounin July 28, 2009 04:59AM

Re: try_files problem

Maxim Dounin July 28, 2009 05:12AM

Re: try_files problem

holstebm July 28, 2009 09:51AM

Re: try_files problem

Igor Sysoev July 30, 2009 03:00PM

Re: try_files problem

holstebm July 30, 2009 04:59PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 264
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