Welcome! Log In Create A New Profile

Advanced

Re: Slow down, but not stop, serving pages to bot that doesn't respect robots.txt delay

August 11, 2011 05:10PM
I dont believe you can use limi_req within an if statement. You might have
to rewire the if to a different location and then apply the rule:

Example:

if ( $http_user_agent ~* (?:bot|spider) ) {
error_page 403 = @bots;
return 403;
}

location @bots {
limit_req zone=antiddosspider burst=1;
}


GL.

Rami

On Thu, Aug 11, 2011 at 11:56 AM, rastrano <nginx-forum@nginx.us> wrote:

> with this conf i get:
> Testing nginx configuration: [emerg]: "limit_req" directive is not
> allowed here in /etc/nginx/sites-enabled/default:52
>
> Posted at Nginx Forum:
> http://forum.nginx.org/read.php?2,213704,213705#msg-213705
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>



--
Cheers,
Rami
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Slow down, but not stop, serving pages to bot that doesn't respect robots.txt delay

rastrano August 11, 2011 11:37AM

Re: Slow down, but not stop, serving pages to bot that doesn't respect robots.txt delay

rastrano August 11, 2011 11:56AM

Re: Slow down, but not stop, serving pages to bot that doesn't respect robots.txt delay

ressaid August 11, 2011 05:10PM

Re: Slow down, but not stop, serving pages to bot that doesn't respect robots.txt delay

rastrano August 12, 2011 05:33AM

Re: Slow down, but not stop, serving pages to bot that doesn't respect robots.txt delay

ressaid August 12, 2011 07:34AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 71
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