Installing mod_evasive for cPanel.
05-13-2010 @ 3:34AM EDT
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>
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