- 论坛徽章:
- 0
|
带宽控制 for apache2
wget
http://apache.ivn.cl/files/source/mod_bw-0.7.tgz
tar -zxvf mod_bw-0.7.tgz
/usr/local/apache/bin/apxs -i -a -c mod_bw.c
vi /usr/local/apache/conf/httpd.conf
确信:
LoadModule bw_module modules/mod_bw.so
vi httpd.conf
Limit al internal users (lan) to 1000 kb/s with a minimum of 50kb/s , and
files greater than 500kb to 50kb/s.
BandwidthModule On
ForceBandWidthModule On
Bandwidth all 1024000
MinBandwidth all 50000
LargeFileLimit * 500 50000
Servername
www.example.com
Limit avi and mpg extensions to 20kb/s.
BandwidthModule On
ForceBandWidthModule On
LargeFileLimit .avi 1 20000
LargeFileLimit .mpg 1 20000
Servername
www.example.com
Using it the "right" way, with output filter by mime type (for text)
to 5kb/s:
BandwidthModule On
AddOutputFilterByType MOD_BW text/html text/plain
Bandwidth all 5000
Servername
www.example.com
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/13000/showart_250636.html |
|