Limit bandwidth in apache |
7
JUN
09
Recently I had to limit download speed for files on one of my servers and found the perfect tool. mod_bandwidth is an apache module created by Ivan Barrera which gives you the possibility to limit the bandwidth for files or restrict the number of simultaneous connections. It should work for almost any platform (definately on my Windows 2003 Server).
- download http://ivn.cl/files/source/mod_bw-0.8.tgz
- use Windows Release for Apache 2.2.2 for Apache 2.2.3
- copy it to apaches /modules folder
- added the following to apache config file httpd.conf:
LoadModule bw_module modules/mod_bw-2_2_2.dll BandWidthModule On ForceBandWidthModule On BandWidth all 200000 BandWidth 123.4 600000 MinBandWidth all 50000
- restart apache
Now my apache limits download speed for users to ~200kb per second. Only users comming from IP range 123.4 will have three time as much.
If more than one user downloads, it will be splitted accordingly but everyone will have at least 50kb
4atxmuf9b6is working fine under Windows 7 Relese Candidate code, 64 bit, with apache_2.2.11-win32-x86-openssl-0.9.8i.msi
today's date is 20 July 2009
@Juan: thanks for that info since I want to replace Vista asap.
