Last Tweet

    KuJoe's Tweets

Categories

Latest Article

Latest Comment

Tag Cloud

Powered By...

Installing mod_evasive for cPanel.

Comments (0)
 
I used this module a long time ago but ended up ditching it for some reason (can't recall why now). Anyways, somebody brought it to my attention so I figured I would go ahead and install it again on my new VPS. Credit goes here. The only reason I am reposting it is because I am adding some more notes and correcting the code. ;)

Download and extract:
wget http://www.zdziarski.com/blog/wp-content/uploads/2010/02/mod_evasive_1.10.1.tar.gz
tar zxvf mod_evasive_1.10.1.tar.gz
cd mod_evasive


Load module:
/usr/local/apache/bin/apxs -i -a -c mod_evasive20.c

Save httpd.conf (prevent overwriting next time your recompile Apache):
/usr/local/cpanel/bin/apache_conf_distiller --update

Add to /usr/local/apache/conf/includes/post_virtualhost_2.conf:
Code:
<IfModule mod_evasive20.c>
DOSHashTableSize 3097
DOSPageCount 2
DOSSiteCount 50
DOSPageInterval 1
DOSSiteInterval 1
DOSBlockingPeriod 3600
DOSEmailNotify [email protected]
DOSLogDir "/var/lock/mod_evasive"
</IfModule>


For the last step, the easiest method is to login to WHM and navigate to "Include Editor" (Main >> Service Configuration >> Apache Configuration >> Include Editor). Once you are there, find "Post VirtualHost Include" and under it select your current version of Apache from the drop down menu.

Update and ensure Apache restarts! ;)

cpanel, apache, servers, tutorials, security

Comments

This article hasn't been commented yet.

Write a comment

* = required field

:

:

: