Apache mod_cband 설치

IT/Linux / / 2022. 1. 8. 14:42
반응형

안녕하세요 유똥입니다.
오늘은 mod_cband에 대하여 포스팅 진행 하겠습니다.

 

 mod_cband 란?

apache 2.x에서 다수의 홈페이지에 대한 트래픽 제한 및 모니터링 관련 툴입니다.
도메인별 트래픽제한이 가능하며 트래픽 사용량을 확인 할 수 있습니다.

 

기본 호스팅 상품을 이용하는 경우 기본 트래픽 회신은 10M이며,

10M가 넘어가게되면, 초과 트래픽이 발생되어 비용적으로 부담이 될 수있습니다.

mod_cband을 설정하여 트래픽 제한 및 모니터링을 하여 비용 및 효율적으로 트래픽을 관리해보시기 바랍니다.

mod_cband를 설치하여 트래픽 제한설정을 하는법을 알려드리도록하겠습니다.

 

 mod_cband 설치

wget을 통해 mod-cband에 대한 소스 파일을 받아옵니다.
cd /root/src/
wget https://fossies.org/linux/www/apache_httpd_modules/old/mod-cband-0.9.7.5.tgz

압축 해제 및 경로 진입
tar xvfpz mod-cband-0.9.7.5.tgz
cd mod-cband-0.9.7.5

경로 확인
find / -name "apxs" -print
* 저의 Apache 경로는 /opt 하단에 설치되어 있습니다.
* 각자 경로의 맞게 컴파일 진행해주시면 됩니다.

./configure --with-apxs=/home/apache/bin/apxs
make && make install

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
chmod 755 /opt/apache/modules/mod_cband.so

 

 모듈 확인 및 설정 방법

httpd.conf
LoadModule cband_module       modules/mod_cband.so
ㄴ cband_module 설정

<IfModule mod_cband.c>
        <Location /cband-status>
                SetHandler cband-status
        </Location>
        <Location /cband-status-me>
                SetHandler cband-status-me
        </Location>
        <Location /~*/cband-status-me>
                SetHandler cband-status-me
        </Location>
        <Location /cband-status>
                Order deny,allow
                Deny from all
                Allow from 허용해야 할 IP
        </Location>
</IfModule>

 

 사이트 확인

IP/cband-status

 

정리.txt
0.00MB

반응형

'IT > Linux' 카테고리의 다른 글

Apache mod_evasive 설치  (0) 2022.01.11
클라우드플레어(Cloudflare) 적용  (0) 2022.01.10
리눅스 Apache 2.2 modsecurity 설치  (0) 2021.12.25
리눅스 Apache 2.4 modsecurity 설치  (0) 2021.12.25
Ubuntu 20.04 LTS 서버버전 설치  (0) 2021.12.25
  • 네이버 블러그 공유하기
  • 네이버 밴드에 공유하기
  • 페이스북 공유하기
  • 카카오스토리 공유하기
});