安裝 libapache2-mod-bw
apt-get install libapache2-mod-bw
啟用bw模組
a2enmod bw

在虛擬網站設定加入參數
[VirtualHost w1.test.com:80]

bahlah...
bahlah...

BandWidthModule On
ForceBandWidthModule On
Bandwidth all 10240

bahlah...
bahlah...
[/VirtualHost]


存檔後重新啟動apache即可.
==================================================
可調整參數有
BandWidthModule [On|Off]
ForceBandWidthModule [On|Off]
 
BandWidth [from] [bytes/s]
MinBandWidth [from] [bytes/s]
[from]可以是localhost,192.168.1.0/24,all
[bytes/s]就是速度
 
LargeFileLimit [type][min size][bytes/s]
大檔限制,檔案超過[min size]就把速度限在[bytes/s]
 
BandWidthPacket [size]
一般不作調整
 
BandWidthError [error]
 
MaxConnection [from][max]
限制最大連線數
arrow
arrow
    全站熱搜

    Vega 發表在 痞客邦 留言(0) 人氣()