Welcome! Log In Create A New Profile

Advanced

limit_req for spiders only

Toni Mueller
October 14, 2013 08:00AM
Hi,

I would like to put a brake on spiders which are hammering a site with
dynamic content generation. They should still get to see the content,
but only not generate excessive load. I therefore constructed a map to
identify spiders, which works well, and then tried to

limit_req_zone $binary_remote_addr zone=slow:10m ...;

if ($is_spider) {
limit_req zone=slow;
}


Unfortunately, limit_req is not allowed inside "if", and I don't see an
obvious way to achieve this effect otherwise.

If you have any tips, that would be much appreciated!


Kind regards,
--Toni++

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

limit_req for spiders only

Toni Mueller October 14, 2013 08:00AM

Re: limit_req for spiders only

Sylvia October 14, 2013 09:25AM

Re: limit_req for spiders only

Toni Mueller October 14, 2013 10:04AM

Re: limit_req for spiders only

Francis Daly October 14, 2013 10:24AM

Re: limit_req for spiders only

Toni Mueller October 14, 2013 10:54AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 97
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready