I’ve done everything I found, but still I’m getting this error in the windows client.
Server replied "413 Request Entity Too Large" to PUT ...
OR
Unable to write
But then I find these kind of errors in the config/log/nginx/error.log
client intended to send too large body: 748952021 bytes ...
When I drag and drop a file in the browser (3.3GB) it uploads just fine. It seems only to have trouble with the auto syncing using the windows nextcloud client.
I’m using the local ip address, which rules out the reverse proxy.
I have checked .htaccess and .user.ini for similar variables, but didn’t find any.
Whenever the container gets an update, these values reset, which is quite annoying. Just mentioning this for testing purposes.
I’m using the latest image and fresh install: https://docs.linuxserver.io/images/docker-nextcloud
I have tried to add these env variables in my docker yaml:
- PHP_UPLOAD_LIMIT=1024G
- PHP_MEMORY_LIMIT=1024M
I changed this value in /config/nginx/nginx.conf
(I also tried giving it 0)
client_max_body_size 1024G;
Also this command didn’t work inside my container: sudo -u www-data php occ config:app:set files max_chunk_size --value 20971520
Now note, when I go into my cloud using the browser and upload a file it had trouble with (above error), it uploads fine and is there in the cloud (3.3GB file). So it seems like it’s giving errors that I can’t figure out.
I’ve been trying to get this fixed, but unfortunately I don’t know what else to try at this point.
Help would be appreciated!
Within every effected vhost apache conf (if you have apache behind the nginx reverse proxy and your nextcloud instances connect via https (ssl)). And within the SSL vhost go to the www directory statement under which nextcloud exists. You must place the SSLRengeBufferSize inside and not outside the directory statement!
<directory /your/www/directory/>
...
## Nextcloud behind nginx ssl reverse proxy no more upload possible (Err 413)
## Below Setting is 20MB but you can deal with other sizes
SSLRenegBufferSize 20971520
...
</directory>
So, in my case, there is no need to change the client configs. I din’t want this, because on the webinterface of NextCloud, I had the same upload Problem and I needed another solution.
Previously I had also tried everything that is written in countless forums. But of course I left the values that I set here (below) in the configs as they now have an effect for the future.
I didn’t change anything on Apache before, which was previously running without the nginx reverse proxy, except for the new ports (8080+8443).
About the setup: I have the Nginx reverse proxy running on the same server as Apache. The proxy therefore forwards to a local URL (80+443 are forwarded to 8080+8443). The server has enough power for this. The goal was simply to speed up the wordpress blogs, which I more than SUCCEEDED with the new setup