server Apache Module mod_ratelimit (아파치 트래픽 제한)
2012.05.11 16:15
참고 문서 |
---|
tar xvfpz mod-cband-0.9.7.5.tgz cd mod-cband-0.9.7.5 ./configure --with-apxs=/usr/local/apache/bin/apxs
Specific information on upgrading modules from 2.2
여러 시도를 했지만 apache 2.4 에서 mod_cband 컴파일시 오류출력..
수정했던 파일은 일단 백업 mod-cband-0.9.7.5.tgz
아파치 2.4 에 내장되어 있는 mod_ratelimit 라는 녀석을 사용하기로 했습니다.
mod_throttle, mod_cband 와 같이 아파치의 트래픽을 설정하는 모듈입니다.
#LoadModule ratelimit_module modules/mod_ratelimit.so 주석해제 하고 모듈을 로드합니다.
<Location /downloads> SetOutputFilter RATE_LIMIT SetEnv rate-limit 400 </Location>
예제는 위와 같고.. VirtualHost 에 적용할 때는 아래와 같이 하면 되겠죠?
<VirtualHost *> ServerAdmin [email protected] DocumentRoot /home/elkha/public_html ServerName elkha.kr ServerAlias *.elkha.kr php_admin_value doc_root /home/elkha php_admin_value upload_max_filesize 100M php_admin_value user_dir /home/elkha/public_html # php_admin_value open_basedir / AddType application/x-httpd-php .html .php # mod_ratelimit 설정 SetOutputFilter RATE_LIMIT SetEnv rate-limit 400 # 기본 단위: KiB/s </VirtualHost>
mod_ratelimit 검색을 해보면 한국어 자료가 하나도 없네요..
이 모듈이 생긴지 얼마 안되어 옵션도 rate-limit 하나 뿐이지만, 추후 다양한 기능이 추가되기를 기대하고 있습니다.
댓글 0
번호 | 제목 | 날짜 | 조회 수 |
---|---|---|---|
81 | vmware with centos 7 | 2019.08.23 | 0 |
80 | php-fpm tcp to socket | 2020.01.25 | 0 |
79 | net::ERR_CONNECTION_REFUSED | 2021.10.11 | 0 |
78 | my.cnf | 2019.04.11 | 1 |
77 | To download large files with rsync command. | 2023.05.04 | 21 |
76 | The best configuration of php7.4-fpm / 1.5GB | 2023.05.04 | 23 |
75 | The best configuration of php7.4-fpm / 8GB | 2023.05.04 | 23 |
74 | windows hardware encrypt ssd | 2024.01.23 | 206 |
73 | gearman 은 무엇인가? | 2023.06.21 | 270 |
72 | apache2 AllowOverride config | 2023.05.23 | 278 |
71 | php 에서 비동기 처리하는 방법 | 2023.06.22 | 288 |
70 | mysqldump from remote db to my local server. | 2023.05.04 | 421 |
69 | yum install php 7.1 [6] | 2018.10.10 | 687 |
68 | mysql 백업 (shell script) | 2018.10.14 | 697 |
67 | munin 설치 | 2018.10.13 | 787 |
66 | yum install mariadb [2] | 2018.10.10 | 1143 |
65 | 웹 백업 (쉘 스크립트) | 2018.10.14 | 1193 |
64 | certbot apache multiple domain | 2019.04.10 | 1416 |
63 | yum install php-apcu | 2019.03.12 | 1542 |
62 | yum install latest redis | 2019.03.27 | 1682 |