Slow down, but not stop, serving pages to bot that doesn't respect robots.txt delay
Rami Essaid
rami.essaid at gmail.com
Thu Aug 11 21:07:56 UTC 2011
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 at 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 at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
--
Cheers,
Rami
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20110811/7c1e6911/attachment-0001.html>
More information about the nginx
mailing list