Nextcloud File Drop limit

1. The problem I’m having:

Hi, i just started using Caddy v2.6.4 in docker its been great so far. I fixed a lot of issues as you can see in my caddy conf but I can’t fixed the upload issue where I can only upload 1G and under on a shared file drop link.

When I sign in as a user I can pass the upload limit. It’s only when I share a link I get limited. When I use Nginx Proxy Manager I’m able to have the same unlimited upload in and externally.

3. Caddy version: v2.6.4

4. How I installed and ran Caddy: Docker/Portainer

b. Command:

version: "3.8"
services:
  caddy:
    image: caddy:latest
    container_name: caddy
    restart: unless-stopped
    ports:
      - "80:80"
      - "443:443"
      - "443:443/udp"
    volumes:
      - /home/luser/desktop/caddy/Caddyfile:/etc/caddy/Caddyfile
      - /home/luser/desktop/caddy/site:/srv
      - /home/luser/desktop/caddy/caddy_data:/data
      - /home/luser/desktop/caddy/caddy_config:/config

d. My complete Caddy config:

example.com, examplenew.com {
    reverse_proxy 192.168.1.1:9980

     header Host {host}
     header X-Real-IP {remote}
     header X-Forwarded-For {remote}
     header X-Forwarded-Proto {scheme}
     header X-Forwarded-Host {host}

    redir /.well-known/carddav /remote.php/dav/ 301
    redir /.well-known/caldav /remote.php/dav/ 301

#    encode gzip
 #    handle_path /remote.php/upload {
     {
	"max_size": 0
     }
   # }

#    header enable HSTS
 #   header Strict-Transport-Security max-age=31536000;
     header {
         # disable FLoC tracking
         Permissions-Policy interest-cohort=()

         # enable HSTS
         Strict-Transport-Security max-age=31536000;

        # disable clients from sniffing the media type
         nosniff

        # clickjacking protection
         sameorigin
          #X-Frame-Options DENY

        # keep referrer data off of HTTP connections
         Referrer-Policy no-referrer-when-downgrade
     }
}

Remove all these. They’re useless and incorrect.

This doesn’t make sense, it’s invalid syntax.

These are also invalid syntax.

Nothing in Caddy inherently limits the size of requests or uploads. I don’t think the problem is with Caddy.

thank you so much for your quick reply.

I will remove the syntax you told me to.

I have been trying to replicate the same results that I have with Nginx Proxy Manager.

Is there a working syntax similar to “client_max_body_size 0;” that NPM uses?

But, I’m testing the speed and upload limit with Filerun, and its only one config
needed which is the reverse proxy. And the upload and download speeds are unlimited on both ends. Internal and External links.

I will double-check Nextcloud, just find it weird they will limit Caddy but not NPM.

There is request_body (Caddyfile directive) — Caddy Documentation but the default is “no limit” so it’s not relevant.

Please show an example request that gets limited with curl -v (you can copy a request from your browser’s inspector > network tab as a curl command).

Please turn on the debug global option and show your logs from making a request that gets limited.

I tried syntax before i added it in to my Caddyfile is it ok that im using the import in the Caddy file and referencing my conf in the site directory just want to give you the full scope of my setup.

I didn’t know how to do the curl logs i went into Nextcloud in Protinaer and got the logs. I took out the username its labeled “NEXTCLOUD_USERNAME”.

You will see the file it was a xubuntu file 3.08GB. and my request body is at 4GB.
Please let me know if these logs.

Caddy updated Config:

example.com, examplenew.com {
    reverse_proxy 192.168.1.1:9980

    redir /.well-known/carddav /remote.php/dav/ 301
    redir /.well-known/caldav /remote.php/dav/ 301
    
    request_body {
      max_size 4096MB
    }
     header {
         # disable FLoC tracking
         Permissions-Policy interest-cohort=()

         # enable HSTS
         Strict-Transport-Security max-age=31536000;

        # keep referrer data off of HTTP connections
         Referrer-Policy no-referrer-when-downgrade
     }
}



Logs from Nextcloud:

172.25.0.1 - RdnqwMQdoobsMxC [06/Jul/2023:23:11:43 +0000] “PUT /public.php/webdav/xubuntu-22.04.2-desktop-amd64.iso HTTP/1.1” 400 1390 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.5.1 Safari/605.1.15”

172.25.0.1 - - [06/Jul/2023:23:11:49 +0000] “GET /csrftoken HTTP/1.1” 200 892 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36”

172.25.0.1 - NEXTCLOUD_USERNAME [06/Jul/2023:23:11:53 +0000] “PROPFIND /remote.php/dav/files/NEXTCLOUD_USERNAME/ HTTP/1.1” 207 1065 “-” “Mozilla/5.0 (Macintosh) mirall/3.9.0git (build 16016) (Nextcloud, osx-22.5.0 ClientArchitecture: arm64 OsArchitecture:
arm64)”

Hey Francis can I PM you the links I was talking about so you can see the error on your end with nextcloud file limits?

I can send you a FileRun and nextcloud link both deployed on caddy

Because the “request body” syntax didn’t work

:point_up: this is the information we need.

You shouldn’t use that anyway. Like I said, Caddy does not have any limits by default, so adding a limit will obviously not help in any way.

Thank you again for your help.

I think this is it i did “copy all as a cURL” and after that i “curl -v” the request URL in my terminal below is the readout and i did this with a 2.79GB file.

I removed IP address made it “1.2.3.4” and my site name and put “example.com” but the rest of the data is there. If you are open to it i can send you the shared link to reproduce the error on your end. It seems to be any file over 1GB.

Copy all as cURL in browser inspector

curl 'https://example.com/public.php/webdav/Media_Composer_23.3.1_Mac.dmg' \
  -X 'PUT' \
  -H 'authority: example.com' \
  -H 'accept: */*' \
  -H 'accept-language: en-US,en;q=0.9' \
  -H 'authorization: Basic UmRucXdNUWRvb2JzTXhDOg==' \
  -H 'cache-control: max-age=0' \
  -H 'content-disposition: attachment; filename="Media_Composer_23.3.1_Mac.dmg"' \
  -H 'content-length: 2786382895' \
  -H 'content-type: application/octet-stream' \
  -H 'cookie: oc_sessionPassphrase=QNd5zd6fH6Z3JXmGqw5Wb%2FLH6zUEbQLZrHS6NzSkts1Cc7JqkdFixkRULMNrzG66oqqLs8mx8AZyiKkEYul3NlcwTobm78dZmDhHRKz50AlEV9xE5qWJJBUmjeR9W5aZ; och91xv13iog=328748b086183782b37455e5aaac4335; __Host-nc_sameSiteCookielax=true; __Host-nc_sameSiteCookiestrict=true' \
  -H 'if-none-match: *' \
  -H 'ocs-apirequest: true' \
  -H 'origin: https://example.com' \
  -H 'requesttoken: HziTs3VD5nWp2BBktpNiYmT7yJw1kqzPr2Sw9LNKPnc=:TVTQhjQLlDKCoiZPhaoXAz6tgs9NwO7/zVSE39sdCAA=' \
  -H 'sec-ch-ua: "Not.A/Brand";v="8", "Chromium";v="114", "Google Chrome";v="114"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "macOS"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: same-origin' \
  -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36' \
  -H 'x-oc-mtime: 1688098259.566' \
  -H 'x-requested-with: XMLHttpRequest' \
  --compressed ;
curl 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+CiAgPHBhdGggZD0iTTE0IDEyLjNMMTIuMyAxNCA4IDkuNyAzLjcgMTQgMiAxMi4zIDYuMyA4IDIgMy43IDMuNyAyIDggNi4zIDEyLjMgMiAxNCAzLjcgOS43IDh6Ii8+Cjwvc3ZnPgo=' \
  -H 'Referer;' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36' \
  --compressed

curl -v the request URL in terminal

curl -v 'https://example.com/public.php/webdav/Media_Composer_23.3.1_Mac.dmg' 
*   Trying 1.2.3.4:443...
* Connected to example.com (1.2.3.4) port 443 (#0)
* ALPN: offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
*  CAfile: /etc/ssl/cert.pem
*  CApath: none
* (304) (IN), TLS handshake, Server hello (2):
* (304) (IN), TLS handshake, Unknown (8):
* (304) (IN), TLS handshake, Certificate (11):
* (304) (IN), TLS handshake, CERT verify (15):
* (304) (IN), TLS handshake, Finished (20):
* (304) (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / AEAD-AES128-GCM-SHA256
* ALPN: server accepted h2
* Server certificate:
*  subject: CN=example.com
*  start date: Jul  5 03:04:52 2023 GMT
*  expire date: Oct  3 03:04:51 2023 GMT
*  subjectAltName: host “example.com" matched cert's "example.com"
*  issuer: C=US; O=Let's Encrypt; CN=R3
*  SSL certificate verify ok.
* using HTTP/2
* h2h3 [:method: GET]
* h2h3 [:path: /public.php/webdav/Media_Composer_23.3.1_Mac.dmg]
* h2h3 [:scheme: https]
* h2h3 [:authority: example.com]
* h2h3 [user-agent: curl/7.88.1]
* h2h3 [accept: */*]
* Using Stream ID: 1 (easy handle 0x7fa563811400)
> GET /public.php/webdav/Media_Composer_23.3.1_Mac.dmg HTTP/2
> Host: example.com
> user-agent: curl/7.88.1
> accept: */*
> 
< HTTP/2 401 
< alt-svc: h3=":443"; ma=2592000
< cache-control: no-store, no-cache, must-revalidate
< content-security-policy: default-src 'self'; script-src 'self' 'nonce-QnhUcDl3UVBnUm0rREhFT1JGaFV6VStPKys1cmdNbzUweVpaMlEwRCs2RT06Y1VHbG1IWTIxMURHZkNGK2ZUOGY5Q1RFb284aTZZbE9zV2NzdkdKUmtmTT0='; style-src 'self' 'unsafe-inline'; frame-src *; img-src * data: blob:; font-src 'self' data:; media-src *; connect-src *; object-src 'none'; base-uri 'self';
< content-type: application/xml; charset=utf-8
< date: Mon, 10 Jul 2023 06:53:12 GMT
< expires: Thu, 19 Nov 1981 08:52:00 GMT
< permissions-policy: interest-cohort=()
< pragma: no-cache
< referrer-policy: no-referrer-when-downgrade
< referrer-policy: no-referrer
< server: Caddy
< server: Apache/2.4.56 (Debian)
< set-cookie: och91xv13iog=d285302415ff124911f86e2d117312b4; path=/; secure; HttpOnly; SameSite=Lax
< set-cookie: oc_sessionPassphrase=QqzKPZKoggqaAHtOL3cCEfaf0iWE5mi35j0bkw4wJfwpe388B27c3oShafJFVQlqaB6ypbKhOC%2FWD6BHIdlzeAfaxhB8mdIvfUP7AxLdqq%2FOFA85weEUKopHDZNOQhC9; path=/; secure; HttpOnly; SameSite=Lax
< set-cookie: och91xv13iog=06852fb953c5ad1348485c7de83324ef; path=/; secure; HttpOnly; SameSite=Lax
< set-cookie: och91xv13iog=06852fb953c5ad1348485c7de83324ef; path=/; secure; HttpOnly; SameSite=Lax
< set-cookie: __Host-nc_sameSiteCookielax=true; path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=lax
< set-cookie: __Host-nc_sameSiteCookiestrict=true; path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=strict
< set-cookie: och91xv13iog=06852fb953c5ad1348485c7de83324ef; path=/; secure; HttpOnly; SameSite=Lax
< strict-transport-security: max-age=31536000;
< www-authenticate: Basic realm="Nextcloud", charset="UTF-8"
< x-content-type-options: nosniff
< x-frame-options: SAMEORIGIN
< x-permitted-cross-domain-policies: none
< x-powered-by: PHP/8.2.7
< x-robots-tag: noindex, nofollow
< x-xss-protection: 1; mode=block
< content-length: 305
< 
<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre\DAV\Exception\NotAuthenticated</s:exception>
  <s:message>No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured</s:message>
</d:error>
* Connection #0 to host example.com left intact

You’re missing all the header arguments from the command you copied from the browser. You need to run the entire command, not just the first line.

Also you didn’t share your Caddy logs from making the request.

Hi, Francis I sent you a PM it has some personal data in there along with my cloud link to reproduce the error. Also, i sent some info on my logs as well. Hopefully, we can find a solution I would love to share this publicly because this has happened to me with Cloudflare tunnels but it was a chunking limitation of 100MB.

Being that this is a fresh install on a DMZ network with no need to use CF Tunnels was using NPM then I switched to Caddy.

I’m not interested in giving private support.

Please post your logs here. We need to see your debug logs, we’re not looking for error logs.

My current logs from Caddy in Docker is below. I changed my website domain to “example.com” and “exampleto.com

Not sure if this matters but this was the last line in my logs for Caddy in Portainer. Saw it after i ran the command in next section. Leading to the Json output.

ERR ts=1689044402.769358 logger=http.handlers.reverse_proxy msg=aborting with incomplete response error=http2: stream closed

Ran this command to get the log output below

docker logs caddy 2>&1 | jq

{
  "level": "warn",
  "ts": 1688958603.486633,
  "msg": "exiting; byeee!! 👋",
  "signal": "SIGTERM"
}
{
  "level": "info",
  "ts": 1688958603.4868908,
  "logger": "tls.cache.maintenance",
  "msg": "stopped background certificate maintenance",
  "cache": "0xc000033340"
}
{
  "level": "info",
  "ts": 1688958603.4869623,
  "logger": "admin",
  "msg": "stopped previous server",
  "address": "localhost:2019"
}
{
  "level": "info",
  "ts": 1688958603.4869704,
  "msg": "shutdown complete",
  "signal": "SIGTERM",
  "exit_code": 0
}
{
  "level": "info",
  "ts": 1688958604.3446407,
  "msg": "using provided configuration",
  "config_file": "/etc/caddy/Caddyfile",
  "config_adapter": "caddyfile"
}
{
  "level": "info",
  "ts": 1688958604.347093,
  "logger": "admin",
  "msg": "admin endpoint started",
  "address": "localhost:2019",
  "enforce_origin": false,
  "origins": [
    "//localhost:2019",
    "//[::1]:2019",
    "//127.0.0.1:2019"
  ]
}
{
  "level": "info",
  "ts": 1688958604.3474681,
  "logger": "http",
  "msg": "server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS",
  "server_name": "srv0",
  "https_port": 443
}
{
  "level": "info",
  "ts": 1688958604.3474822,
  "logger": "http",
  "msg": "enabling automatic HTTP->HTTPS redirects",
  "server_name": "srv0"
}
{
  "level": "info",
  "ts": 1688958604.3475606,
  "logger": "tls.cache.maintenance",
  "msg": "started background certificate maintenance",
  "cache": "0xc0003d53b0"
}
{
  "level": "info",
  "ts": 1688958604.3477728,
  "logger": "http",
  "msg": "enabling HTTP/3 listener",
  "addr": ":443"
}
{
  "level": "info",
  "ts": 1688958604.3478181,
  "logger": "tls",
  "msg": "cleaning storage unit",
  "description": "FileStorage:/data/caddy"
}
{
  "level": "info",
  "ts": 1688958604.347834,
  "msg": "failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Receive-Buffer-Size for details."
}
{
  "level": "info",
  "ts": 1688958604.347892,
  "logger": "http.log",
  "msg": "server running",
  "name": "srv0",
  "protocols": [
    "h1",
    "h2",
    "h3"
  ]
}
{
  "level": "info",
  "ts": 1688958604.3479152,
  "logger": "http.log",
  "msg": "server running",
  "name": "remaining_auto_https_redirects",
  "protocols": [
    "h1",
    "h2",
    "h3"
  ]
}
{
  "level": "info",
  "ts": 1688958604.3479197,
  "logger": "http",
  "msg": "enabling automatic TLS certificate management",
  "domains": [
    "example.com",
    "example2.photos"
  ]
}
{
  "level": "info",
  "ts": 1688958604.3487427,
  "msg": "autosaved config (load with --resume flag)",
  "file": "/config/caddy/autosave.json"
}
{
  "level": "info",
  "ts": 1688958604.3487723,
  "msg": "serving initial configuration"
}
{
  "level": "info",
  "ts": 1688958604.3490746,
  "logger": "tls",
  "msg": "finished cleaning storage units"
}
{
  "level": "info",
  "ts": 1688958844.5534682,
  "msg": "shutting down apps, then terminating",
  "signal": "SIGTERM"
}
{
  "level": "warn",
  "ts": 1688958844.5538046,
  "msg": "exiting; byeee!! 👋",
  "signal": "SIGTERM"
}
{
  "level": "info",
  "ts": 1688958845.5946903,
  "logger": "tls.cache.maintenance",
  "msg": "stopped background certificate maintenance",
  "cache": "0xc0003d53b0"
}
{
  "level": "info",
  "ts": 1688958845.5948968,
  "logger": "admin",
  "msg": "stopped previous server",
  "address": "localhost:2019"
}
{
  "level": "info",
  "ts": 1688958845.5949206,
  "msg": "shutdown complete",
  "signal": "SIGTERM",
  "exit_code": 0
}
{
  "level": "info",
  "ts": 1688971047.6639946,
  "msg": "using provided configuration",
  "config_file": "/etc/caddy/Caddyfile",
  "config_adapter": "caddyfile"
}
{
  "level": "info",
  "ts": 1688971047.6681757,
  "logger": "admin",
  "msg": "admin endpoint started",
  "address": "localhost:2019",
  "enforce_origin": false,
  "origins": [
    "//localhost:2019",
    "//[::1]:2019",
    "//127.0.0.1:2019"
  ]
}
{
  "level": "info",
  "ts": 1688971047.6696672,
  "logger": "http",
  "msg": "server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS",
  "server_name": "srv0",
  "https_port": 443
}
{
  "level": "info",
  "ts": 1688971047.6696844,
  "logger": "http",
  "msg": "enabling automatic HTTP->HTTPS redirects",
  "server_name": "srv0"
}
{
  "level": "info",
  "ts": 1688971047.6703994,
  "logger": "tls.cache.maintenance",
  "msg": "started background certificate maintenance",
  "cache": "0xc000400e70"
}
{
  "level": "info",
  "ts": 1688971047.6723228,
  "logger": "tls",
  "msg": "cleaning storage unit",
  "description": "FileStorage:/data/caddy"
}
{
  "level": "info",
  "ts": 1688971047.6734529,
  "logger": "http.log",
  "msg": "server running",
  "name": "remaining_auto_https_redirects",
  "protocols": [
    "h1",
    "h2",
    "h3"
  ]
}
{
  "level": "info",
  "ts": 1688971047.673628,
  "logger": "http",
  "msg": "enabling HTTP/3 listener",
  "addr": ":443"
}
{
  "level": "info",
  "ts": 1688971047.673737,
  "msg": "failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Receive-Buffer-Size for details."
}
{
  "level": "info",
  "ts": 1688971047.6743896,
  "logger": "http.log",
  "msg": "server running",
  "name": "srv0",
  "protocols": [
    "h1",
    "h2",
    "h3"
  ]
}
{
  "level": "info",
  "ts": 1688971047.6743991,
  "logger": "http",
  "msg": "enabling automatic TLS certificate management",
  "domains": [
    "example.com",
    "example2.photos"
  ]
}
{
  "level": "info",
  "ts": 1688971047.677398,
  "logger": "tls",
  "msg": "finished cleaning storage units"
}
{
  "level": "info",
  "ts": 1688971047.6780698,
  "msg": "autosaved config (load with --resume flag)",
  "file": "/config/caddy/autosave.json"
}
{
  "level": "info",
  "ts": 1688971047.6780882,
  "msg": "serving initial configuration"
}
{
  "level": "info",
  "ts": 1688972708.319269,
  "msg": "shutting down apps, then terminating",
  "signal": "SIGTERM"
}
{
  "level": "warn",
  "ts": 1688972708.3193138,
  "msg": "exiting; byeee!! 👋",
  "signal": "SIGTERM"
}
{
  "level": "info",
  "ts": 1688972708.3195474,
  "logger": "tls.cache.maintenance",
  "msg": "stopped background certificate maintenance",
  "cache": "0xc000400e70"
}
{
  "level": "info",
  "ts": 1688972708.3196142,
  "logger": "admin",
  "msg": "stopped previous server",
  "address": "localhost:2019"
}
{
  "level": "info",
  "ts": 1688972708.3196244,
  "msg": "shutdown complete",
  "signal": "SIGTERM",
  "exit_code": 0
}
{
  "level": "info",
  "ts": 1688972709.3051028,
  "msg": "using provided configuration",
  "config_file": "/etc/caddy/Caddyfile",
  "config_adapter": "caddyfile"
}
{
  "level": "info",
  "ts": 1688972709.3063872,
  "logger": "admin",
  "msg": "admin endpoint started",
  "address": "localhost:2019",
  "enforce_origin": false,
  "origins": [
    "//localhost:2019",
    "//[::1]:2019",
    "//127.0.0.1:2019"
  ]
}
{
  "level": "info",
  "ts": 1688972709.3073766,
  "logger": "tls.cache.maintenance",
  "msg": "started background certificate maintenance",
  "cache": "0xc000550230"
}
{
  "level": "info",
  "ts": 1688972709.3073936,
  "logger": "http",
  "msg": "server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS",
  "server_name": "srv0",
  "https_port": 443
}
{
  "level": "info",
  "ts": 1688972709.307419,
  "logger": "http",
  "msg": "enabling automatic HTTP->HTTPS redirects",
  "server_name": "srv0"
}
{
  "level": "info",
  "ts": 1688972709.3081656,
  "logger": "http.log",
  "msg": "server running",
  "name": "remaining_auto_https_redirects",
  "protocols": [
    "h1",
    "h2",
    "h3"
  ]
}
{
  "level": "info",
  "ts": 1688972709.3081927,
  "logger": "tls",
  "msg": "cleaning storage unit",
  "description": "FileStorage:/data/caddy"
}
{
  "level": "info",
  "ts": 1688972709.3082135,
  "logger": "http",
  "msg": "enabling HTTP/3 listener",
  "addr": ":443"
}
{
  "level": "info",
  "ts": 1688972709.308274,
  "msg": "failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Receive-Buffer-Size for details."
}
{
  "level": "info",
  "ts": 1688972709.308327,
  "logger": "http.log",
  "msg": "server running",
  "name": "srv0",
  "protocols": [
    "h1",
    "h2",
    "h3"
  ]
}
{
  "level": "info",
  "ts": 1688972709.3083372,
  "logger": "http",
  "msg": "enabling automatic TLS certificate management",
  "domains": [
    "example2.photos",
    "example.com"
  ]
}
{
  "level": "info",
  "ts": 1688972709.308921,
  "logger": "tls",
  "msg": "finished cleaning storage units"
}
{
  "level": "info",
  "ts": 1688972709.3095303,
  "msg": "autosaved config (load with --resume flag)",
  "file": "/config/caddy/autosave.json"
}
{
  "level": "info",
  "ts": 1688972709.309542,
  "msg": "serving initial configuration"
}
{
  "level": "info",
  "ts": 1689033484.1996872,
  "msg": "shutting down apps, then terminating",
  "signal": "SIGTERM"
}
{
  "level": "warn",
  "ts": 1689033484.1997328,
  "msg": "exiting; byeee!! 👋",
  "signal": "SIGTERM"
}
{
  "level": "info",
  "ts": 1689033484.19995,
  "logger": "tls.cache.maintenance",
  "msg": "stopped background certificate maintenance",
  "cache": "0xc000550230"
}
{
  "level": "info",
  "ts": 1689033484.2000654,
  "logger": "admin",
  "msg": "stopped previous server",
  "address": "localhost:2019"
}
{
  "level": "info",
  "ts": 1689033484.200079,
  "msg": "shutdown complete",
  "signal": "SIGTERM",
  "exit_code": 0
}
{
  "level": "info",
  "ts": 1689033485.1736963,
  "msg": "using provided configuration",
  "config_file": "/etc/caddy/Caddyfile",
  "config_adapter": "caddyfile"
}
parse error: Invalid numeric literal at line 97, column 6

I’m not seeing any debug level logs. You didn’t enable the debug global option as I asked.

My sincere apologies, if this isnt it below. Please let me know what specific browser would let me use the instructions you shared with me in previous post?

curl ‘https://example.com/public.php/webdav/Media_Composer_23.3.1_Mac.dmg' \
  -X 'PUT' \
  -H 'authority: example.com' \
  -H 'accept: */*' \
  -H 'accept-language: en-US,en;q=0.9' \
  -H 'authorization: Basic UmRucXdNUWRvb2JzTXhDOg==' \
  -H 'cache-control: max-age=0' \
  -H 'content-disposition: attachment; filename="Media_Composer_23.3.1_Mac.dmg"' \
  -H 'content-length: 2786382895' \
  -H 'content-type: application/octet-stream' \
  -H 'cookie: oc_sessionPassphrase=R5pNdOu2f8xFGFlFEGFBCKkeSfz2yk%2F%2BDyOGGmFbMiMujVbjejf59ZLxY0001QpSmwPE%2BzeYmjolKbRQ3V9fD4vz2AnwCdMg4gQEXohQczotJuJ%2FIv3GktHMzwuDmx0%2B; nc_sameSiteCookielax=true; nc_sameSiteCookiestrict=true; __Host-nc_sameSiteCookielax=true; __Host-nc_sameSiteCookiestrict=true; oc2x2wjbqyt4=596314a41f26d2d83605ce7fb4466a0f; ocalubv79qz5=a84b780f7d83e71518454432645b071d; nc_username=Movies071; och91xv13iog=314def1e9c7bee4434fb95cdb81fc9ce; nc_token=P5v5pCzTi3nKGEEhRykkgBSV9XLf8Hyy; nc_session_id=314def1e9c7bee4434fb95cdb81fc9ce' \
  -H 'if-none-match: *' \
  -H 'ocs-apirequest: true' \
  -H 'origin: https://example.com' \
  -H 'requesttoken: 4vpGpUOXoN1kz4H/envvwtZOjXwoIHze1bA3wBPfPcU=:i80z3xv247Qyn/aGIyqssbo0/DJ6GEWPoeBzr2OXd6I=' \
  -H 'sec-ch-ua: "Not.A/Brand";v="8", "Chromium";v="114", "Google Chrome";v="114"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "macOS"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: same-origin' \
  -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36' \
  -H 'x-oc-mtime: 1688098259.566' \
  -H 'x-requested-with: XMLHttpRequest' \
  --compressed

Please read the docs.

I think i got it to work i just dont know how to get the logs looking right the. Ran a docker logs command.

Ran docker command

docker logs caddy | jq
{"level":"debug","ts":1689068440.0333831,"logger":"http.handlers.reverse_proxy","msg":"selected upstream","dial":"192.168.1.1:9980","total_upstreams":1}
{"level":"debug","ts":1689068440.0713377,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.1.1:9980","duration":0.037823219,"request":{"remote_ip":"91.246.58.169","remote_port":"48088","proto":"HTTP/2.0","method":"PUT","host":"example.com","uri":"/public.php/webdav/Media_Composer_23.3.1_Mac.dmg","headers":{"X-Oc-Mtime":["1688098259.566"],"Dnt":["1"],"Ocs-Apirequest":["true"],"If-None-Match":["*"],"Content-Disposition":["attachment; filename=\"Media_Composer_23.3.1_Mac.dmg\""],"Authorization":[],"Origin":["https://example.com"],"Sec-Ch-Ua-Platform":["\"macOS\""],"Sec-Fetch-Dest":["empty"],"Accept-Encoding":["gzip, deflate, br"],"Cookie":[],"Sec-Ch-Ua":["\"Not.A/Brand\";v=\"8\", \"Chromium\";v=\"114\""],"Accept":["*/*"],"Sec-Ch-Ua-Mobile":["?0"],"X-Forwarded-Host":["example.com"],"User-Agent":["Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"],"X-Requested-With":["XMLHttpRequest"],"Content-Length":["2786382895"],"Content-Type":["application/octet-stream"],"Sec-Fetch-Site":["same-origin"],"Cache-Control":["max-age=0"],"Requesttoken":["bz5jyEqEN/SEy42JuFgG4wVjPvj7tDoZlCOUeeDTFUA=:BU0NkCXtGJHm+tuw6282uW8AUJ647VFs8U7iE6znYnk="],"Accept-Language":["en-US,en;q=0.9"],"Sec-Fetch-Mode":["cors"],"X-Forwarded-For":["91.246.58.169"],"X-Forwarded-Proto":["https"]},"tls":{"resumed":false,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"example.com"}},"headers":{"Content-Type":["text/html; charset=iso-8859-1"],"Date":["Tue, 11 Jul 2023 09:40:40 GMT"],"X-Xss-Protection":["1; mode=block","1; mode=block"],"Server":["Apache/2.4.56 (Debian)"],"Referrer-Policy":["no-referrer","no-referrer"],"X-Permitted-Cross-Domain-Policies":["none","none"],"X-Content-Type-Options":["nosniff","nosniff"],"X-Frame-Options":["SAMEORIGIN","SAMEORIGIN"],"X-Robots-Tag":["noindex, nofollow","noindex, nofollow"]},"status":413}
{"level":"debug","ts":1689069136.39608,"logger":"http.handlers.reverse_proxy","msg":"selected upstream","dial":"192.168.1.1:9980","total_upstreams":1}
{"level":"debug","ts":1689069136.6297193,"logger":"http.handlers.reverse_proxy","msg":"upstream roundtrip","upstream":"192.168.1.1:9980","duration":0.233498478,"request":{"remote_ip":"91.246.58.169","remote_port":"19998","proto":"HTTP/2.0","method":"GET","host":"example.com","uri":"/csrftoken","headers":{"Ocs-Apirequest":["true"],"Sec-Ch-Ua-Platform":["\"macOS\""],"Sec-Fetch-Dest":["empty"],"Accept-Encoding":["gzip, deflate, br"],"Dnt":["1"],"Sec-Ch-Ua":["\"Not.A/Brand\";v=\"8\", \"Chromium\";v=\"114\""],"User-Agent":["Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"],"Requesttoken":["bz5jyEqEN/SEy42JuFgG4wVjPvj7tDoZlCOUeeDTFUA=:BU0NkCXtGJHm+tuw6282uW8AUJ647VFs8U7iE6znYnk="],"Sec-Ch-Ua-Mobile":["?0"],"X-Requested-With":["XMLHttpRequest"],"Sec-Fetch-Site":["same-origin"],"X-Forwarded-Proto":["https"],"X-Forwarded-Host":["example.com"],"Cookie":[],"Accept":["*/*"],"Accept-Language":["en-US,en;q=0.9"],"Sec-Fetch-Mode":["cors"],"X-Forwarded-For":["91.246.58.169"]},"tls":{"resumed":true,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"example.com"}},"headers":{"X-Request-Id":["9ZjZ8HJcpApq4Ty1uBMl"],"Feature-Policy":["autoplay 'none';camera 'none';fullscreen 'none';geolocation 'none';microphone 'none';payment 'none'"],"Pragma":["no-cache"],"X-Content-Type-Options":["nosniff"],"X-Robots-Tag":["noindex, nofollow"],"Expires":["Thu, 19 Nov 1981 08:52:00 GMT"],"Content-Encoding":["gzip"],"Content-Type":["application/json; charset=utf-8"],"Date":["Tue, 11 Jul 2023 09:52:16 GMT"],"X-Frame-Options":["SAMEORIGIN"],"Content-Security-Policy":["default-src 'none';base-uri 'none';manifest-src 'self';frame-ancestors 'none'"],"X-Xss-Protection":["1; mode=block"],"X-Powered-By":["PHP/8.2.7"],"Cache-Control":["no-cache, no-store, must-revalidate"],"Content-Length":["121"],"Server":["Apache/2.4.56 (Debian)"],"Referrer-Policy":["no-referrer"],"X-Permitted-Cross-Domain-Policies":["none"]},"status":200}

Status 413 is coming from your upstream app. That status code means “Content Too Large”. This isn’t a problem with Caddy, your upstream app is rejecting the request.

You’ll need to get help from NextCloud forums about this.

Apparently Apache introduced a 1GB limit. See this issue:

Thank you so much, for your help but #1 thank you for your Patience! I got it to work. Thanks again.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.