Bitbull Tech Notes - home of free minds ...

Bandwith Limitation with Apache on CentOS 7

 

Install and configure:

yum install http://repo.unmanarc.com/CentOS/7/RPMS/x86_64/mod_bw-0.92-2.el7.centos.x86_64.rpm
rpm -ql mod_bw
sed -i 's@extramodules/mod_bw.so@modules/mod_bw.so@g' /etc/httpd/conf.d/mod_bw.conf
systemctl restart httpd

Configure virtual Apache host:

<VirtualHost *:80>
     ServerAdmin admin@bitbull.ch
     DocumentRoot /srv/www/html
     ServerName www.bitbull.ch
     ServerAlias www
     ErrorLog /srv/www/log/error.log
     DirectoryIndex index.php index.html index.htm
  <Directory /srv/www/html>
        BandWidthModule On
        ForceBandWidthModule On
        BandWidth all 409600
        BandWidthError 510
        AllowOverride all
        Require all granted
    </Directory>
</VirtualHost>
systemctl restart httpd
Home