https://httpd.apache.org/docs/2.4/mod/mod_ratelimit.html
Apache Module mod_ratelimit
Available Languages: en | fr
Description: Bandwidth Rate Limiting for Clients
Status: Extension
Module Identifier: ratelimit_module
Source File: mod_ratelimit.c
Compatibility: rate-initial-burst available in httpd 2.4.24 and later. Rate limiting proxied content does not work correctly up to httpd 2.4.33.
1 2 |
$ uname -a Linux SERVER_NAME 4.4.0-139-generic #165-Ubuntu SMP Wed Oct 24 10:58:50 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux |
1 2 3 4 5 |
$ cd /etc/apache2/mods-enabled/ $ sudo ln -s ../mods-available/ratelimit.load . $ cat ratelimit.load $ cd .. $ sudo vi apache2.conf |
1 2 3 4 5 6 7 8 9 10 11 |
<IfModule mod_ratelimit.c> # <Location "/roundcube"> <Location "/~username/wordpress"> SetOutputFilter RATE_LIMIT # KiB/s # SetEnv rate-limit 400 SetEnv rate-limit 8 # KiB SetEnv rate-initial-burst 512 </Location> </IfModule> |
1 |
$ sudo /etc/init.d/apache2 restart |