:: Install mod_evasive on cPanel

35 sec read

:: What is mod_evasive
mod_evasive is an evasive maneuvers module for Apache to provide evasive action in the event of an HTTP DoS or DDoS attack or brute force attack. – zdziarski
 
:: How to install mod_evasive on cPanel / WHM
+ download and install

cd /usr/local/src
wget //www.zdziarski.com/blog/wp-content/uploads/2010/02/mod_evasive_1.10.1.tar.gz
tar xzf mod_evasive_1.10.1.tar.gz
cd mod_evasive
apxs -cia mod_evasive20.c
/usr/local/cpanel/bin/apache_conf_distiller --update

+ configure

vi /usr/local/apache/conf/includes/post_virtualhost_2.conf
# add these line
<IfModule mod_evasive20.c>
DOSHashTableSize    3097
DOSPageCount        2
DOSSiteCount        50
DOSPageInterval     1
DOSSiteInterval     1
DOSBlockingPeriod   3600
DOSEmailNotify	    [email protected]
DOSSystemCommand    "/usr/sbin/csf -d %s"
DOSLogDir	    "/var/lock/mod_evasive"
</IfModule>

i used csf to blocked, you can use apf or other tools to blocked.

+ restarting httpd

/etc/init.d/httpd restart 

or you can use whm to restarting httpd.

 
:: Links
+ Google
+ Bloke

How to fix problem with the editor ‘vi’

:: git error with vi error: There was a problem with the editor 'vi'   :: how to fix the problem 0. check path...
sysadmin.id
10 sec read

Apache :: MP4 Streaming

:: How to Enable mp4 Streaming in Apache + Installing mod h624 streaming wget //h264.code-shop.com/download/apache_mod_h264_streaming-2.2.7.tar.gz tar -xzf apache_mod_h264_streaming-2.2.7.tar.gz cd mod_h264_streaming-2.2.7/ ./configure --with-apxs=`which apxs2` make...
sysadmin.id
18 sec read

Apache :: Flash / FLV Streaming

:: How to Configure Apache for FLV Streaming + Installing mod_flvx wget //people.apache.org/~pquerna/modules/mod_flvx.c which apxs /usr/bin/apxs /usr/bin/apxs -cia mod_flvx.c + setup mod_flvx in http.conf...
sysadmin.id
15 sec read