Weird issues with nginx

Vasil Kolev vasil at
Sat Jun 15 22:01:37 UTC 2013

В 22:06 +0100 на 15.06.2013 (сб), Francis Daly написа:

> 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 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?

The limit_rate directive doesn't accept a variable as a parameter,
otherwise that would've been easier. I might just copy the location 4
times with the speed hardcoded for each one, to get rid of the ifs,
shouldn't be too ugly.

I'll test this tomorrow.

Vasil Kolev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <>

More information about the nginx mailing list