Welcome! Log In Create A New Profile

Advanced

Re: limit_req for spiders only

Francis Daly
October 14, 2013 10:24AM
On Mon, Oct 14, 2013 at 01:59:23PM +0200, Toni Mueller wrote:

Hi there,

This is untested, but follows the docs at http://nginx.org/r/limit_req_zone:

> 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;
> }
>

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

In your map, let $is_spider be empty if is not a spider ("default",
presumably), and be something else if it is a spider (possibly
$binary_remote_addr if every client should be counted individually,
or something else if you want to group some spiders together.)

Then define

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

instead of what you currently have.

f
--
Francis Daly francis@daoine.org

_______________________________________________
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: 87
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