Limit robots

double nginx-forum at
Fri Jan 13 13:36:20 UTC 2012


Is there a chance to limit robots to 1 request per second?
The down below does not work:  [emerg] "limit_req" directive is not
allowed here

Thanks a lot

http {
    limit_req_zone      $http_user_agent  zone=useragenttrack:1m 
    server {
        listen          80;
        location / {
            if ($http_user_agent ~* "[a-z]bot[^a-z]") {
                limit_req   zone=useragenttrack  burst=100 nodelay;

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

More information about the nginx mailing list