Share your full Traefik static and dynamic config, and docker-compose.yml if used.
Use 3 backticks in front and after config, or select and press </> button, it improves readability and with yaml every space matters.
Connection refused means the port is not open. Where do you run Traefik, any routers to be configure, any firewalls blocking or container ports not open? Domain pointing to the right IP?
Thanks a lot for a quick reply, I wrapped the configuration in ticks.
Share your full Traefik static and dynamic config
This is full Kamal's config, I don't have anything else. There is no compose. Is there a way to ask Traefik for this full configuration?
Connection refused means the port is not open. Where do you run Traefik, any routers to be configure, any firewalls blocking or container ports not open? Domain pointing to the right IP?
Well, it's just Docker on a VPS:
domainname.com -> Traefik -> Application in a Docker container
Note that going to domainname.com in the browser works, the only thing that doesn't work is asking for this name inside the Docker container or the VPS for that matter. It's a bit weird.
I am thinking if it's related to the fact that Traefic only accepts the domain name but not a plain IP (in the browser) since /etc/hosts points locally to an IP.
When you request the URL with a client, the domain is used to lookup the IP and then the client connects to the IP and port. But the http request still contains the original domain name and path, which is used to do the domain matching in Traefik.
So in the end I answered my own question :). It really was because of /etc/hosts. And it happened because I initially named the virtual machine like that. DO then automatically created this entry which I haven't realize at that point...