-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
After my last docker image update I suddenly saw upload failures for very large files, even though I hadn't changed any configuration, and the nextcloud docker build also has no related configuration changes. I finally tracked the problem down to a change in Apache default configuration.
Steps to reproduce:
- Start with nextcloud apache docker image built before June 9, 2022
- Check included Apache version (is 2.4.53)
- Create large testfile (
dd if=/dev/zero of=testfile bs=1M count=1025) - Create upload share in nextcloud
curl -X PUT -H "X-Requested-With: XMLHttpRequest" -T testfile http://<shareid>:<sharepass>@<host>/public.php/webdav/testfile- Update docker image to newest version (Apache is now 2.4.54)
curl -X PUT -H "X-Requested-With: XMLHttpRequest" -T testfile http://<shareid>:<sharepass>@<host>/public.php/webdav/testfile2
Actual result:
Step 5 works, Step 7 doesn't work. A smaller testfile (dd if=/dev/zero of=testfile bs=1M count=1024) will still work with the new image.
Root cause: https://httpd.apache.org/docs/current/en/mod/core.html#limitrequestbody has changed default value in Apache version 2.4.53 from 0 (unlimited) to 1073741824. Note: This also means the the various documentation entries about increasing PHP_UPLOAD_LIMIT etc. don't apply.
IMHO this is a regression, and the apache nextcloud docker image should change the builtin Apache configuration back to the old value of 0 (unlimited).