Limit bandwidth with Apache using the libapache2-mod-bw
package which installs mod-bw.
Install Package
apt-get install libapache2-mod-bw
Load Module
a2enmod bw
Modify Apache’s configuration
Add the following in the VirtualHost section… in Debian, the Virtual Host configuration files are typically found inin /etc/apache2/sites-available/
.
BandwidthModule On ForceBandwidthModule On # 1mbit/s (128KB/s) - value is in bytes Bandwidth all 131072 ErrorDocument 510 510.html BandWidthError 510
Reload Apache
service apache2 reload