How to configure mod_reqtimeout in Apache2

Solution 1:

To check if the module is loaded, you can use the command

apachectl -M or apache2ctl -M

, depending on your OS. If it's not loaded, you can load it on Debian/Ubuntu systems using

a2enmod reqtimeout

, on CentOS/RHEL systems you will have to edit your /etc/httpd/conf/httpd.conf. Find the lines starting with LoadModule and add one like this:

LoadModule reqtimeout_module modules/mod_reqtimeout.so

Make sure to restart apache afterwards. To configure it, you just add a line starting with

RequestReadTimeout

and the values you want to either your httpd.conf (global) or some VirtualHost configuration (just for the vhost).