I'm sucessfully running traefik v2 with a bunch of docker containers and works flawlessly.
But one docker integration doesn't work as I've expected. In fact is unifi docker that needs access to port 8443. Well the issue is if I use https://whateverthatputshere.mydomain.com:8443 the webpage loads, when I expect to load only with https://unifi.mydomain.com:8443. This is the code for the unifi docker container:
I've got about other 10 container working well, the rule Host redirect to the container as expected, but this one with unifi docker has this strange behaviour.
Perhaps some in my configuration is not well defined or I've misunderstood some configuration.
I guess, that's because you're exposing port 8443 directly from the container to the Host, so you're request might not be going through Traefik. Can you try without exposing that Ports to the Host?
Then all connections from Traefik to the Container, will be done on port 8443. That's what you need, right? You should then not be needed to expose the port to the host.
Or do I missunderstand you? What is your desired solution? Should Traefik terminate the connection on HTTPS default (Port 443) and just use internally 8443, or do you expect your clients to use 8443 as well? Then please paste your Traefik configuration as well
Well the problem is that unifi need more ports accessible to the Wifi devices contact with it. And the 8443 is the access to portal admin.
I've tried what you said in the past, but it didn't work. Only if I exposed the port admin portal load.
Yes, and given your configuration that is "correct".
If you want Traefik to terminate the connection on Port 8443, Traefik needs to listen on Port 8443. So you need to expose the Port 8443 on Traefik, not on your service. Additionally, you need to create an entrypoint in your traefik.toml on Port 8443.
Then, you should be able to connect to your unifi service through Traefik, on Port 8443.
It doesn't matter what disable or enable on it, only if the port 8443 is enabled on ports works partially (cause every subdomain load admin portal of unifi)
Thank you so much @SantoDE, you're right but additionally I need to include other parameter: insecureSkipVerify = true on traefik.toml, and I don't know what impact have to enable that on traefik security related.
Well this is the final config files to get Unifi work with Traefik v2: