As in the past to apache 1 mod_throttle gasanghoseuteubyeol the measure and limit traffic was possible.
Limiting the traffic to the hosting is required. Used in any domain that
Knowing very important job. But,
apache2 could only give this guy writes. Is search. cband found.
mod_throttle and function and the structure and almost identical, mod_bandwidth including the functions of, and
Continued performance improvements have been developed recently was becoming.
Than flattering,? Xml glue that, if data are available in the form of xml,
For hosting a really good module.
[Note] cband the apache 2 module. is not easy apache 1.3.XX 1.3.XX mod_throttle use!
[Feature]
* Apache2 module for traffic restrictions Lightweight
* Per-user bandwidth limit
* Gasanghoseuteubyeol bandwidth limit
* The purpose-specific bandwidth limit
* Limit:
All user bandwidth limit o
o limit download sokje
o Fresh water limit requests per second
o IP vs. Small Areas limit
* Support for virtualhosts
* Support for defined users
* Limit the results confirm a Web-based (/ cband-status)
* Check the results for each user limit (/ cband-status-me)
A. How to Install
cd / usr / local
wget http://cband.linux.pl/download/mod-cband-0.9.7.4.tgz
tar xvfpz mod-cband-0.9.7.4.tgz
cd mod-cband-0.9.7.4
. / Configure – with-apxs = / usr / local / apache / bin / apxs
# # Option Description
# # – With-apxs = / usr / local / apache / bin / apxs: apache apxs to specify the path.
make
make install
Two. Verifying the Installation
– Httpd.conf file
LoadModule cband_module modules / mod_cband.so
You can see that the added lines.
– Apache / modules directory
mod_cband.so
You can see what files are added.
Three. The default setting
====================================
<Location /cband-status>
SetHandler cband-status
Order deny, allow
Deny from all
Allow from IP to open up
</ Location>
<Location /cband-status-me>
SetHandler cband-status-me
</ Location>
<VirtualHost *>
ServerName gnux.co.kr
Document / home / gnux / www
CBandLimit 300Mi
CBandPeriod 1D
CBandExceededURL http://manager.gnux.co.kr/traffic_exceeded.html
</ VirtualHost>
======================================
The configuration file in the domain of gnux.co.kr
Day, 300M (300 * 1024 * 1024byte) is set to provide the traffic.
In terms of as a bit, 2.4Gbit / is to provide a traffic.
If you exceed 300M in one day, “http://manager.gnux.co.kr/traffic_exceeded.html”
Pop up page, if you did not give 503 error page will appear.
You! If you want to without restriction in infants, CBandPeriod like portion is deleted.
Four. Contextual Setting
1) Media Speed Limit
==============================
<VirtualHost *>
ServerName rmohan.com
Document / home / gnux / file
CBandSpeed 1024 10 30
CBandRemoteSpeed 20kb / s 3 30
</ VirtualHost>
==============================
File rmohan.com above settings for the domain
Speed is limited to 1024kbps, and 10 times per second connection,
An example of concurrent users is limited to 30.
2) provide users and ilteuraepik yeongyeolsu limit is exceeded.
==============================
<VirtualHost *>
ServerName rmohan.com
Document / home / gnux / doly
CBandLimit 100Mi
CBandExceededSpeed 128 5 15
CBandPeriod 1D
</ VirtualHost>
==============================
rmohan.com above settings for a domain
Day of 100Mbyte provide traffic and
If the second 100M,
Limited to 128bps rate, five times per second connection,
An example of concurrent users is limited to 15.
3) If a user has multiple domains?
==============================
<CBandUser Host_user1>
CBandUserLimit 100Mi
CBandUserPeriod 1D
</ CBandUser>
<VirtualHost *>
ServerName rmohan.com
Document / home/host_user1/aaa
CBandUser host_user1
</ VirtualHost>
<VirtualHost *>
ServerName rmohan.com
Document / home/host_user1/bbb
CBandUser host_user1
</ VirtualHost>
==============================
Set of virtual users to specify that the host_user1 a following.
The user is enables the use of a day 100Mbyte.
Then, aaa.co.kr, bbb.co.kr all of host_user1
Traffic has been set to use.
4) IP range, depending on if you want to limit the speed?
==============================================
<CBandClass Class_1>
CBandClassDst 192.168.0.0/24
</ CBandClass>
<CBandClass Class_2>
CBandClassDst 222.97.189.0/24
</ CBandClass>
<VirtualHost *>
ServerName rmohan.com
Document / home / gnux / intranet
CBandClassRemoteSpeed class_1 50Mbps 10 30
CBandClassRemoteSpeed class_2 300kbps 10 30
</ VirtualHost>
==============================================
For the above configuration, the internal IP 192.168.0.XXX, in
The bandwidth of 50Mbps, and 10 times per second the request, a setting of 30 concurrent users, and
In a different ip range 222.97.189.XXX
300kpbs, one request per second, 30 sets of concurrent users.
5 Check usage.
http:// domain / cband-status
http:// domain / cband-status-me
6. Indicators and unit description (if applicable huge!)
Recent Comments