Weird issues with nginx

Francis Daly francis at daoine.org
Sat Jun 15 21:06:36 UTC 2013


On Sat, Jun 15, 2013 at 04:32:04PM +0300, Vasil Kolev wrote:

Hi there,

> Removing the ifs in the config fixes the problem, but that doesn't help
> me :)
> 
> This is a compiled nginx from source, on debian stable (wheezy), with a
> few small additions available at
> https://github.com/krokodilerian/trafstat/tree/master/nginx . 
> 
> Any ideas how to proceed with this,

The usual first step would be to see whether the problem persists when
you just use the distributed nginx, with no external modules or patches.

But in this case, that's probably unnecessary, since you already know
that without the "if" statements, no problems appear.


You use "if" inside "location", and you do something other than "return
..." or "rewrite ... last". Under those circumstances, pretty much all
bets are off (unless you can explain why your use is safe).

See http://wiki.nginx.org/IfIsEvil for some more details.

Perhaps using a "map" to set values to be used in limit_rate and
limit_rate_after directives would avoid the "if in location" problem?

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list