I am running Nextcloud behind Traefik using these labels on the nextcloud container:
labels:
- traefik.enable=true
- traefik.http.routers.nextcloud.entrypoints=websecure
- traefik.http.routers.nextcloud.rule=Host(`cloud.domain.tld`)
- traefik.http.routers.nextcloud.tls.certresolver=cloudflare
I get to many redirects when using that URL, what I have read about this is that I need to use websecure to avoid this and that is what I have used.
With these I get an 404:
- traefik.http.routers.nextcloud.middlewares=nextcloud,nextcloud_redirect
- traefik.http.routers.nextcloud.tls.certresolver=cloudflare
- traefik.http.routers.nextcloud.rule=Host(`cloud.domain.tld`)
- traefik.http.middlewares.nextcloud.headers.customFrameOptionsValue=ALLOW-FROM https://domain.tld
- traefik.http.middlewares.nextcloud.headers.contentSecurityPolicy=frame-ancestors 'self' domain.tld *.domain.tld
- traefik.http.middlewares.nextcloud.headers.stsSeconds=155520011
- traefik.http.middlewares.nextcloud.headers.stsIncludeSubdomains=true
- traefik.http.middlewares.nextcloud.headers.stsPreload=true
- traefik.http.middlewares.nextcloud_redirect.redirectregex.regex=/.well-known/(card|cal)dav
- traefik.http.middlewares.nextcloud_redirect.redirectregex.replacement=/remote.php/dav/
So... what do I need to do to get this to work?