Bandwidth Limiting
I wanted to setup some bandwidth throttling to make sure I don't use too much bandwidth. I started out with mod_throttle which I couldn't get to compile on a couple of machines, and was sort of cryptic. I looked around for some help and couldn't find much.
Someone sent me mod_bandwidth which despite some weird documentation (it was in the code) it compiled just fine. I just a
Someone sent me mod_bandwidth which despite some weird documentation (it was in the code) it compiled just fine. I just a
./configure --add-module=/root/mod_bandwidth.c
and then a make
No problem... after that make some temp directories for it and some config changes. Do a BandWidthModule On
and then put BandWidth All 1024
in your virtual host (or directory statement) and everyone only gets 1024 bytes per second. Really pretty simple.
mkdir /tmp/apachebw
mkdir /tmp/apachebw/link
mkdir /tmp/apachebw/master
chmod 777 /tmp/apachebw
chmod 777 /tmp/apachebw/link
chmod 777 /tmp/apachebw/master