NextCloud Docker+Traefik


I use NextCloud in docker and my container use Traefik for reverse proxy. Actually my NextCloud local work.
But if i check my Nexcloud in the net with my domaine, the Traefik certificate work but the page display “400 Bad Request The plain HTTP request was sent to HTTPS port nginx/1.16.0”

I try to change nginx conf or config.php but its doesnt work.

thank you

https://youdomain and have a try.
if using http://yourdomain, that error will occur.
But if you type https in the browser, and it became http, and got the error discribed above, I don’t know why.

a working config you can find here:

in roles/docker_container/tasks/nginx.yml you’ll find how to start nginx.
in roles/docker_container/tasks/traefik.yml you’ll find how to start traefik.
in roles/docker_container/templates/ you’ll find the traefik and nginx config files.

did you check the traefik port/protocol talking to nginx? and did you setup nginx to listen to the same port? running the two container on the same machine i guess it’s safe to use http.

    labels: "frontend"
      traefik.enable:         "true"
      traefik.frontend.rule:  "Host:{{ nextcloud_server_fqdn }}"
      traefik.port:           "80"
      traefik.protocol:       "http"

thank for your help. Actually my Traefik pass http demand on https. So when i try http://blabla directly bypass on https://

Hey there,
in the meantime, traefik v2.x is available. The configuration changed fundamentally. I posted an example configuration on my github repository: