limit_req with IP whitelisting

LeMaitre nginx-forum at
Wed Jul 6 20:27:57 MSD 2011

Hi folks,

I want to use limit_req with whitelisting some subnet, I have seen this
post:,200815,200815#msg-200815 and
done some test but it's not working.

I have added to server context:

geo $rate {
 default 5; # 5r/s -; -; -;

limit_req_zone $binary_remote_addr zone=ratezone:10m rate=$rate;
limit_req zone=ratezone burst=10 nodelay;

And I receive as error: nginx: [emerg] invalid rate "rate=$rate"

Any idea how to fix this issue?

2) Is it possible to use limit_req for a single domaine "$host"?

Thanks in advance.


Posted at Nginx Forum:,211989,211989#msg-211989

More information about the nginx mailing list