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
- Download this filehttps://raw.githubusercontent.com/shivaas/mod_evasive/master/mod_evasive24.cin to your server
- Run $APACHE_ROOT/bin/apxs -i -a -c mod_evasive24.c
- The module will be built and installed into $APACHE_ROOT/modules,and loaded into your httpd.conf
- 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:
- To use
apxs
you will need to installhttpd24-devel
as noted in https://stackoverflow.com/a/37528944/1776044. 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";