Install Mod evasive module on cPanel(Easy Apache 4 )
Install Mod evasive module on cPanel(Easy Apache 4 ):
Date Posted: 23-09-2017
Mod evasive is a DDOS prevention module used to prevent DDOS prevention on HTTP level. Latest cPanel version has easy apache 4 and by default mod_evasive doesn’t come with it.
Recently, cPanel added cl-ea4-experimental repository. In this post, we will explain on how to install mod_evasive module on cPanel server.
Prerequisites:
- cPanel server
- Easy apache 4
- WHM access
Implementation:
Login to the server via ssh.
Execute the command yum install to install the mod_evasive.
yum install --enablerepo=cl-ea4-experimental ea-apache24-mod_evasive.x86_64
Press Y to continue
Create a file /usr/local/apache/conf/includes/mod_evasive.conf
vi /usr/local/apache/conf/includes/mod_evasive.conf
<IfModule mod_evasive20.c> DOSHashTableSize 3097 DOSPageCount 2 DOSSiteCount 50 DOSPageInterval 1 DOSSiteInterval 1 DOSBlockingPeriod 3600 DOSLogDir "/var/log/mod_evasive" DOSWhitelist 127.0.0.1 </IfModule>
Create a file /var/log/mod_evasive
touch /var/log/mod_evasive
Restart the httpd service
systemctl restart httpd
Verify the installed module.
# httpd -M|grep eva
evasive24_module (shared)
#