'2019/02/12'에 해당되는 글 1건

[리눅스] 아파치 트래픽 제어


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/ 여기를 참고하세요~



블로그 이미지

영은파더♥

가상서버호스팅 VPS 리눅스 서버관리 윈도우 IT

,