Apache 1.3.x 限制频宽(mod_bandwidth)
仅限 Apache 1.3.x 使用 mod_bandwidth 来限制用户流量。
安装步骤
- 安装 mod_bandwidth 模组,并建立相关目录:
apt-get install mod_bandwidth mkdir /tmp/apachebw mkdir /tmp/apachebw/link mkdir /tmp/apachebw/master chmod -R 777 /tmp/apachebw 
- 编辑 /ect/httpd/conf/httpd.conf,检查是否有
<IfDefine HAVE_BANDWIDTH> LoadModule bandwidth_module modules/mod_bandwidth.so </IfDefine> 及 <IfDefine HAVE_BANDWIDTH> AddModule mod_bandwidth.c </IfDefine> 没有的话请自行加入。 
-  在 AddModule 的区段之后再加上:
BandWidthModule on BandWidth 192.168.1 0 #内网(192.168.1.*)不限流量 BandWidth all 10240 #其它网络限流 10KB/s 
- 储存 httpd.conf 之后,重新启动 Apache 即可。
 

No comments yet.