Minimal configuration

Francis Daly francis at
Sun Feb 16 21:39:22 UTC 2014

On Sun, Feb 16, 2014 at 08:43:45PM +0100, B.R. wrote:

Hi there,

>         try_files       $uri $uri/;

The final argument to "try_files" is special.

> Requesting in the browser ends up wth a HTTP 500 error:
> '[error] 12345#0: *42 rewrite or internal redirection cycle while
> internally redirecting to "/", client:, server:, request:
> "GET / HTTP/1.1", host: ""'


The debug log may show you why.

> Adding / at the end of try_files so it reads:
> try_files       $uri $uri/ /;
> solves the problem...

Adding pretty much anything else at the end of try_files should also work,
for this request.

> Really, I don't get it.
> Any insight on what is going on?

The final argument to "try_files" is a uri for an internal redirect,
not a file to be served.

Francis Daly        francis at

More information about the nginx mailing list