Weird issues with nginx

Francis Daly francis at
Sun Jun 16 00:07:51 UTC 2013

On Sun, Jun 16, 2013 at 01:01:37AM +0300, Vasil Kolev wrote:
> В 22:06 +0100 на 15.06.2013 (сб), Francis Daly написа:

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

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

Ah, yes, you're correct.

$limit_rate could help there, but there doesn't seem to be an equivalent
$limit_rate_after variable, so you're still stuck.

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

That should work.

A series of server-level ifs to set the directive values might also work
-- that may end up more maintainable, perhaps.

Good luck with it,

Francis Daly        francis at

More information about the nginx mailing list