ubuntu apache2 流量限制模块
mod-bw is an Apache 2 module provided to solve the problem of limiting users’ and virtual hosts’ bandwidth usage. The current versions can set virtual hosts’ and users’ bandwidth quotas, maximal download speed, requests-per-second speed and the maximal number of simultaneous IP connections.
mod-bwFeatures:
* Lightweight bandwidth limiting module for Apache2
* per-user bandwidth limiting
* per-virtual host bandwidth limiting
* per-destination bandwidth limiting
Limiting:
* Bandwidth total usage (bandwidth quota)
* Maximal download speed (bandwidth throttling)
* Maximal requests-per-second speed
* Maximal simultaneous IP connections
* Support for virtual hosts
* Support for defined users
Installing mod-bw:
Open the terminal and type following command to install mod-bw
1 |
|
Now enable the module by using the a2enmod command (from terminal):
1 |
|
Below example is showing how to place the bandwidth limit for a given virtual hosts:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
|