fix(Apache): disable mod_reqtimeout body rate limit to allow slow uploads

Fixes #8457 — large file uploads on slow connections were being
terminated by Apache's mod_reqtimeout MinRate=500 default for
request bodies. This adds an explicit RequestReadTimeout directive
that disables the body rate limit (body=0) while keeping the header
timeout for slowloris protection. The existing Timeout directive
(set to APACHE_MAX_TIME / NEXTCLOUD_MAX_TIME) remains as the
effective I/O timeout.

Also ensures mod_reqtimeout is explicitly loaded in the Dockerfile.

Assisted-by: GitHub Copilot:claude-sonnet-4
This commit is contained in:
copilot-swe-agent[bot]
2026-07-31 08:44:38 +00:00
committed by GitHub
parent 5b94a3a27a
commit 452567ed43
2 changed files with 8 additions and 0 deletions
+1
View File
@@ -48,6 +48,7 @@ RUN set -ex; \
-e 's/^#\(LoadModule .*mod_alias.so\)/\1/' \
-e 's/^#\(LoadModule .*mod_mpm_event.so\)/\1/' \
-e 's/^#\(LoadModule .*mod_brotli.so\)/\1/' \
-e 's/^#\(LoadModule .*mod_reqtimeout.so\)/\1/' \
-e 's/\(LoadModule .*mod_mpm_worker.so\)/#\1/' \
-e 's/\(LoadModule .*mod_mpm_prefork.so\)/#\1/' \
-e 's/\(ScriptAlias \)/#\1/' \
+7
View File
@@ -49,6 +49,13 @@ Listen 8000
# See https://httpd.apache.org/docs/current/mod/mod_proxy.html#proxytimeout
ProxyTimeout ${APACHE_MAX_TIME}
# See https://httpd.apache.org/docs/current/mod/mod_reqtimeout.html
# Disable body rate limit so that large uploads on slow connections are not aborted.
# The Timeout directive above still applies as the overall I/O timeout.
<IfModule reqtimeout_module>
RequestReadTimeout header=20-40,MinRate=500 body=0
</IfModule>
# See https://httpd.apache.org/docs/trunk/mod/core.html#traceenable
TraceEnable Off
</VirtualHost>