How to install mod_evasive in Amazon Linux ami How to install mod_evasive in Amazon Linux ami apache apache

How to install mod_evasive in Amazon Linux ami


If you are running Apache 2.4 try yum install mod24_ssl.x86_64


I fix this problem from this url https://github.com/shivaas/mod_evasive

  1. Download this filehttps://raw.githubusercontent.com/shivaas/mod_evasive/master/mod_evasive24.cin to your server
  2. Run $APACHE_ROOT/bin/apxs -i -a -c mod_evasive24.c
  3. The module will be built and installed into $APACHE_ROOT/modules,and loaded into your httpd.conf
  4. Restart Apache

Maybe before Install mod_evasive24 need install some softs: httpd24-dev, libtool, python-devel


Thanks for the follow-up, Erkin; that is very helpful!

Two additional tips:

  1. To use apxs you will need to install httpd24-devel as noted in https://stackoverflow.com/a/37528944/1776044.
  2. This helpful comment suggests a modification to the test script for mod_evasive (test.pl) in case it returns all HTTP 400s:

    line 13:print $SOCKET "GET /?$_ HTTP/1.0\r\nHost: 127.0.0.1\r\n\r\n";