Limit Connections¶
Module: mod_evasive
Description¶
DEPRECATED mod_evasive should be replaced with lua mod_evasive
mod_evasive is a very simplistic module to limit connections per IP.
Options¶
evasive.max-conns-per-ip
limits the number of connections per IP.
evasive.max-conns-per-ip = 3
You may also want to set up conditionals :
evasive.max-conns-per-ip = 1 $HTTP["host"] == "example.com" { evasive.max-conns-per-ip = 2 } $HTTP["host"] == "example2.com" { evasive.max-conns-per-ip = 0 }
0 means unlimited.
In this case, default sites get 1 connections, example.com 2 and example2.com unlimited.
evasive.silent
doesn't log blocked ips in error.log if enabled.
evasive.silent = "enable"
evasive.location (since 1.4.40)
If connection limit is exceeded and evasive.location
is configured, respond with 302 Found (temporary redirect) and Location: evasive.location
instead of returning 403 Forbidden.evasive.location = "http://external.site/busy.html"
must be an external site on a different server or else a redirect loop will result.
Updated by gstrauss over 2 years ago · 18 revisions