[리눅스] 아파치 트래픽 제어
Apache 2.2.x 속도 제어 모듈중에 mod_cband 가 있습니다.
2.4 버전에서도 사용은 가능하지만 약간의 수정이 필요합니다.
mod_qos 라는 모듈도 있는데 yum install mod_qos 로 설치가 가능합니다.
yum install epel_release 가 먼저 설치되어 있어야 합니다.
아래는 mod_qos 기본적인 설정입니다.
/etc/httpd/conf.d/qos.conf 파일을 만들어 주면 됩니다.
# allows max 50 connections from a single ip address:
QS_SrvMaxConnPerIP 50
# limits download bandwidth to 5Mbit/sec (resp. 640kbytes/sec)
#QS_LocKBytesPerSecLimit / 640
# 100Mbps
QS_LocKBytesPerSecLimit / 12800
# disables connection restrictions for certain clients:
QS_SrvMaxConnExcludeIP 127.0.0.1
QS_SrvMaxConnExcludeIP 192.168.1.
# Brute Force
# allows a single IP addess to access the URI /wp-login.php not more
# than 10 times within an hour:
SetEnvIf Request_URI ^/wp-login.php LimitLogin
QS_ClientEventLimitCount 10 3600 LimitLogin
# Status Viewer
<Location /qos>
SetHandler qos-viewer
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
</Location>
status 에 자신의 아이피를 넣어주면 됩니다.
최신 버전을 사용하려면 https://sourceforge.net/projects/mod-qos/files/ 여기에서 최신버전을 다운로드 받으면 됩니다.
사용방법은 http://mod-qos.sourceforge.net/ 여기를 참고하세요~
'LINUX' 카테고리의 다른 글
[CentOS] 네임서버 1차 2차 3차 구축 방법 (4) | 2019.03.14 |
---|---|
[CentOS] 7.x 아파치 2.4.x mod_cband 0.9.7.5 컴파일 (1) | 2019.02.13 |
[CentOS] KVM CDROM 꺼내기 (0) | 2018.12.07 |
[리눅스] qcow2 를 img 형태로 변환하기 (0) | 2018.12.07 |
[CentOS] 7.x KVM 윈도우10 설치 동작 안함 (1) | 2018.12.07 |