Discourse behind Traefik on a subdomain

Hello, Im running Traefik 2 as a reverse proxy with SSL.
From a fresh install, I have set Traefik to redirect any requests from the subdomain forum.domain.com to the discourse’s container port 80, the thing is that when i setted up discourse the first time, i also specified that the subdomain discourse will be listening too will be forum.domain.com, and now when i try to access the domain i get the: ERR_TOO_MANY_REDIRECTS.

And when i try to access to [VPS IP:DISCOURSE EXPOSED PORT] i get redirected to forum.domain.com and i get the same error.

Is there any way for discourse to work behind Traefik on a subdomain? if someone did can they share their mount please? or is there a way that doesn’t involve specifying on the discourse’s setup the subdomain the container will be listening to? (Since i think the redirections that both traefik and discourse do are too much for the browser perhaps?).

I’ve also tried to redirect the requets from forum.domain.com to the discourses container port 443, and i get the “the plain HTTP request was sent to HTTPS port”, despite having traefik manage SSL, and having the subdomain certified via letsencrypt.

Sorry if my explanation is poor, im trying my best since english isn’t my first language, i’ll reply asap to any questions.

Best regards!

1 Like

I use traefik with any problem. I expose no ports and traefik access port 80 on the container.

You didn’t configure https on Discourse did you? If so that’s something to change.


Yep, apparently i had the letsencrypt lines uncommented in my app.yml.

Thanks for the help!