Slightly more verbose way to ask: Is there any way to make Traefik not forward HTTP -> HTTPS for a specific URL, only (while continuing to forward the rest to HTTPS)?
I'm going to switch from nginx if I can do this on traefik. Do you know if it is possible? And if so, then how? I've been trying with nginx here: jwilder/nginx-proxy#1340
I saw told by your GitHub bot to ask here in the forum instead:
Is there a traefik docker-compose.yml you recommend that is widely used and supported?
Not many seem to be using traefik-library-image (on github) in comparison to jwilder's nginx-proxy - any idea why? Maybe the primary recommendation for traefik is not to run in docker, but on the host? Also, do you know the equivalent of VIRTUAL_HOST=thedomainname.com for traefik? It makes it quite easy & nice to run multiple webserver on the same host within containers.
Thanks again!
Hi @TrafikJam, first of all, Traefik has an official Docker image, which the recommended way to run it when using Docker. You can find more on the documentation: https://docs.traefik.io/v2.0/getting-started/install-traefik/#use-the-official-docker-image . The Github repository you mention, traefik-library-image is absolutely not aimed to be used by end users: it's the source of truth for the official Docker Image.
There is no docker-compose.yml that would work out of the box for you, as the context is different for each user. You strongly should take time to read the blog post mentioned earlier, and/or the official documentation to fully understand how it works.
OK, I put in another few hours trying to figure this out. I see the POST on the URL, but it doesn't make its way to the right services somehow. I've tried using internal container@docker and also external URLs as the 'traefik.http.middlewares.old.replacepathregex.replacement='.
I've tried these as labels in the service running "http://www.domain.com/oldURL" the service running "http://services.domain.com/new" - and also both simultaneously. I've also tried it in the global config... And it does still seem like I would have to disable the global HTTPS redirect.
Pretty disappointed about this. I thought the forum would have more than one or two people capable of answering such questions. I regret the time switching from nginx to traefik not realizing traefik refuses to even clarify terminology about its functionality. And directed to get support for way more than I can afford... Of course with no guarantee the problem would get solved.
EDIT: I have figured out the nginx config that I want to translate into traffic terms.
It doesn't work. I get 200s but the service never receives it.
How can I receive on HTTP by a backend service running on HTTPS, and then have it answer on HTTP again?
This is not the only app in the compose file. Another app listens on www.URL.com & URL.com, but I'm not sure if that matters (I tried this replacepath as a label on both apps, either app, and also globally under traefik app).