Ubuntu 16.04
Sponsored Link

mod_ratelimit Settings2016/06/15

Enable mod_ratelimit module to limit bandwidth of clients.
[1] mod_ratelimit is included in apache2 package, so it's possible to configure quickly.
a2enmod ratelimit

vi /etc/apache2/conf-available/ratelimit.conf
# create new

# for example, limit bandwidth as 500 KB/sec under the /download location

<IfModule mod_ratelimit.c>
    <Location /download>
        SetOutputFilter RATE_LIMIT
        SetEnv rate-limit 500
a2enconf ratelimit

systemctl restart apache2
[2] Access to the location to make sure the settings is effective.
The lower one is downloading from the limited location, the upper is downloading from a unlimited location.
Matched Content