The `mod_ratelimit` module is used to limit the bandwidth that Apache utilizes during data transfers. Here’s how to configure this module in Apache:
1. Enable the module: The first thing you need to do is enable the mod\_ratelimit module. This can be done with the command `a2enmod ratelimit` in Debian-based distributions. In Red Hat-based distributions, make sure you have the module file located in the modules directory (/etc/httpd/modules), then you just need to include or uncomment the line `LoadModule rate_limit modules/mod_ratelimit.so` in your Apache config file.
1. Configure the module: The main directive used for mod\_ratelimit is `RLimitBandwidth`. This directive limits the rate of response transmission to the client.
To use it, you have to specify it in your configuration file either in `
```
```
Or
```
```
In the above example, the bandwidth is limited to 500KB/s.
1. Apply changes: After applying the above changes, restart of your apache server is needed for changes to reflect. You can accomplish this with the command `service apache2 restart` on Ubuntu/Debian, or `systemctl restart httpd` on CentOS/Redhat.
Note: The Rates are specified in bytes per second. The default value is unlimited. You can use K or M as shorthand for kilobytes and megabytes, respectively.