2014-11-07 10:42:43 +00:00
|
|
|
{ lib, stdenv, fetchurl, apacheHttpd }:
|
|
|
|
|
|
|
|
if lib.versionAtLeast (lib.getVersion apacheHttpd) "2.4" then
|
|
|
|
|
|
|
|
throw "mod_evasive is not supported on Apache httpd 2.4"
|
|
|
|
|
|
|
|
else
|
2012-07-31 13:51:31 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2013-06-07 00:13:54 +00:00
|
|
|
name = "mod_evasive-1.10.1";
|
2012-07-31 13:51:31 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2020-04-01 01:11:51 +00:00
|
|
|
url = "http://www.zdziarski.com/blog/wp-content/uploads/2010/02/mod_evasive_1.10.1.tar.gz";
|
2012-07-31 13:51:31 +00:00
|
|
|
sha256 = "0rsnx50rjv6xygbp9r0gyss7xqdkcb0hy3wh9949jf1im8wm3i07";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ apacheHttpd ];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
export APACHE_LIBEXECDIR=$out/modules
|
|
|
|
export makeFlagsArray=(APACHE_LIBEXECDIR=$out/modules)
|
|
|
|
apxs -ca mod_evasive20.c
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/modules
|
|
|
|
cp .libs/mod_evasive20.so $out/modules
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://www.zdziarski.com/blog/?page_id=442";
|
2013-10-06 09:49:53 +00:00
|
|
|
description = "Evasive maneuvers module for Apache to provide evasive action in the event of an HTTP DoS or DDoS attack or brute force attack";
|
2012-07-31 13:51:31 +00:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
};
|
|
|
|
}
|