setting up mod_evasive with easyapache4 on cloudlinux 7

caisc

Well-Known Member
Oct 5, 2011
73
3
58
India
cPanel Access Level
Root Administrator
Hi,

want to setup mod_evasive with easyapache4 on my cloudlinux 7 OS server,

Tried to do EasyApache4 but was unable to find mod_evasive in the module list.

Please can someone guide to do the same.

Thanks
 
Last edited:
  • Like
Reactions: 007basaran

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello,

It's not a supported module, however the workaround instructions on the previous post should help.

Thank you.
 

caisc

Well-Known Member
Oct 5, 2011
73
3
58
India
cPanel Access Level
Root Administrator
@007basaran

Got this error on 2nd step -

[root@server ~]# /usr/bin/apxs -i -a -c mod_evasive24.c
-bash: /usr/bin/apxs: No such file or directory
[root@server ~]#

How to fix this, also Where do I put this configuration -

<IfModule mod_evasive20.c>
DOSHashTableSize 3097
DOSPageCount 2
DOSSiteCount 50
DOSPageInterval 1
DOSSiteInterval 1
DOSBlockingPeriod 10
</IfModule>

In this file - /etc/apache2/conf.modules.d/mod_evasive20.conf ?

Thanks
 
Last edited:

007basaran

Active Member
Feb 21, 2017
40
6
58
Turkey
cPanel Access Level
DataCenter Provider
@caisc

Hello,

Code:
wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

rpm -ivh epel-release-6-8.noarch.rpm

yum install ea-apache24-devel

Install apxs and later follow steps.

 wget 'https://raw.githubusercontent.com/shivaas/mod_evasive/master/mod_evasive24.c'
 /usr/bin/apxs -i -a -c mod_evasive24.c
 less /etc/apache2/conf.modules.d/mod_evasive20.conf
 /scripts/restartsrv_httpd
 
Last edited by a moderator: