Welcome! Log In Create A New Profile

Advanced

Re: limit_req and limit_conn in rewrite modules if statement

Nam
November 18, 2013 03:57PM
To elaborate a bit more, in a single location I may end up with something like this...

set $Whitelisted "No";
if ($GeoList1 = allow) {
set $Whitelisted "Yes";
}
if ($GeoList5 = allow) {
set $Whitelisted "Yes";
}
if ($http_user_agent ~ (googlebot|bingbot)) {
set $Whitelisted "Yes";
}
if ($Whitelisted ~* "No") {
limit_conn conlimit-one 5;
limit_req zone=limit-half burst=9;
}

So that I can allow both IPs and user agents to avoid getting limited.
Subject Author Posted

limit_req and limit_conn in rewrite modules if statement

Nam November 18, 2013 02:49PM

Re: limit_req and limit_conn in rewrite modules if statement

Nam November 18, 2013 03:57PM

Re: limit_req and limit_conn in rewrite modules if statement

Jonathan Matthews November 18, 2013 04:06PM

Re: limit_req and limit_conn in rewrite modules if statement

Nam November 18, 2013 06:23PM

Re: limit_req and limit_conn in rewrite modules if statement

Francis Daly November 18, 2013 07:36PM

Re: limit_req and limit_conn in rewrite modules if statement

Nam November 19, 2013 01:47PM

Re: limit_req and limit_conn in rewrite modules if statement

Maxim Dounin November 26, 2013 11:38AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 92
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 254 on July 05, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready