Upload size limit question. WAN vs LAN

Nextcloud is behind reverse proxy and I wondered if there is a limit for uploads via http access.

I can upload from WAN LAN.
However, I seem to be limited to 20MB upload from WAN but no LAN

Please advise.

If you can upload bigger files from LAN (from where you probably bypass the Reverse Proxy) than from WAN, there is most likley some problem with your Reverse Proxy configuration. Please post your config files (webserver config, reverse proxy config and config.php) and describe your setup in a little more detail, otherwise no one here will be able to help you properly.

btw there is an issue template if you open a new topic in the support category. It’s there for a reason… :wink:

1 Like

The reason I didn’t post more was because I thought that this might be a known subject of a limit for WAN vs LAN so I guess this means there should be no difference in theory.

Anyhow, this is my nginix config. I’ts very basic http access at the moment while I learn how things work.

server {
        listen 80;
        server_name nextcloud.racetv.xyz www.nextcloud.racetv.xyz;

        location / {
        proxy_pass http://192.xxx.x.xxx/;
        proxy_buffering off;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
The default install of nextcloud is all I have with one exception of trusted_domains
This is only to get through the proxy

  'trusted_domains' =>
  array (
    0 => '192.yyy.y.yyy',     #this is is my proxy
    1 => '192.xxx.x.xxx',    #this is nextcloud VM
    2 => 'racetv.xyz',
    3 => 'www.racetv.xyz',
    4 => 'nextcloud.racetv.xyz',
    5 => 'www.nextcloud.racetv.xyz',
  'datadirectory' => '/var/snap/nextcloud/common/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => 'http://192.xxx.x.xxx',  #this is nextcloud VM

So I probably have too many listed trusted_domains. I probably only need one item but not sure which is normal. I had a previous problem with android not granting access so I thought it was one of these but ended up being a setting in the proxy instead.

Just fyi.

Today I can’t upload via WAN. Nextcloud is saying “unknown error” I’ll have to read the logs but it is a .pdf file 4.5MB

I get an error but how do I read the error logs.
I can’t find them. It’s a snap install.

New info:
I got Nginix logs and it says “too large body”.

2021/09/09 11:38:26 [error] 1187#1187: *12408 client intended to send too large body: 4354626 bytes, client: 192.xxx.x.x, server: nextcloud.racetv.xyz, request: “PUT /remote.php/webdav/Kubota-K008-3/valves.pdf HTTP/1.1”, host: “nextcloud.ra cetv.xyz”

Working on this a bit myself and it seems your correct that I need to edit my nginix.conf file etc.
client_max_body_size 100M or something similar

I’ll give this a try for now and report back.

Although it was not a detailed solution is was actually correct and prompted me to hunt down the nginix logs and read them, then to update the nginx.conf to fix this.
client_max_body_size 100M: does the trick and I can lower is if needed but for now it’s fixed

1 Like