Welcome! Log In Create A New Profile

Advanced

Re: try_files / if / access_log question

Francis Daly
May 23, 2014 02:54PM
On Fri, May 23, 2014 at 12:22:08PM -0400, sfrazer wrote:

Hi there,

> The try_files config is the new part, everything was working fine before I
> added that.

> location / {
> # if ($ignore_ua) { access_log off; }
> try_files $uri/index.cchtml @gunicorn;
> }

> What am I doing wrong here?

You are using "if" inside "location" without understanding the
subtleties. The safest option is not to do that.

I suspect that the simplest option will be to use a newer nginx which
can do conditional logging without the "if" directive.

http://nginx.org/r/access_log

Failing that, then -- untested! -- you might have luck if you duplicate
the try_files line inside the "if" block.

f
--
Francis Daly francis@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

try_files / if / access_log question

sfrazer May 23, 2014 12:22PM

Re: try_files / if / access_log question

sfrazer May 23, 2014 12:26PM

Re: try_files / if / access_log question

Francis Daly May 23, 2014 02:54PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 141
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready