Minimal configuration

Francis Daly francis at daoine.org
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 b.cd in the browser ends up wth a HTTP 500 error:
> '[error] 12345#0: *42 rewrite or internal redirection cycle while
> internally redirecting to "/", client: 12.34.56.78, server: b.cd, request:
> "GET / HTTP/1.1", host: "b.cd"'

Yes.

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.

http://nginx.org/r/try_files

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list