apache 2.4 cband install
1. 다운로드 및 패치작업
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
[root@xinet ~]# wget mirror.koreaidc.com/apache/mod-cband-0.9.7.5.tar.gz [root@xinet ~]# tar xvfz mod-cband-0.9.7.5.tar.gz [root@xinet ~]# cd mod-cband-0.9.7.5 [root@xinet mod-cband-0.9.7.5]# wget mirror.koreaidc.com/apache/cband_with_apache24_and_ruid2.diff [root@xinet mod-cband-0.9.7.5]# patch -p0 < cband_with_apache24_and_ruid2.diff [root@xinet mod-cband-0.9.7.5]# ./configure -with-apxs=/usr/local/apache/bin/apxs [root@xinet mod-cband-0.9.7.5]# make [root@xinet mod-cband-0.9.7.5]# make install |
2. 가상호스트에 cband 적용
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
[root@xinet mod-cband-0.9.7.5]# vi /usr/local/apache/conf/extra/httpd-vhosts.conf <VirtualHost *:80> DocumentRoot /free/home/xinet/html ServerName xinet.kr ServerAlias www.xinet.kr blog.sochin.kr CustomLog logs/access_log vcommon CBandUser xinet </VirtualHost> # <CBandUser xinet> CBandUserLimit 9000Mb CBandUserPeriod 1D CBandUserScoreboard /usr/local/apache/logs/cband/xinet_Scoreboard </CBandUser> [root@xinet mod-cband-0.9.7.5]# mkdir -p /usr/local/apache/logs/cband/ [root@xinet mod-cband-0.9.7.5]# chown nobody:nobody /usr/local/apache/logs/cband/ |
3. httpd.conf에 내용 수정
1 2 3 4 5 6 7 8 |
[root@xinet mod-cband-0.9.7.5]# vi /usr/local/apache/conf/httpd.conf <IfModule cband_module> <Location /cband-status> SetHandler cband-status Require ip 127.0.0.1 192.168.0.22 </Location> </IfModule> |