Hello everybody,
I am trying to use haproxy to redirect traffic based on the url to different traefic instances in docker containers.
The goal is to overcome shortcomings of traefic in handling multiple dns challenge configurations within one instance.
My problem:
- Redirect to ATraefik and BTraefik works, as well as the letsencryptsetup in both and the services running behind ATraefik and BTraefik.
- But the running services have the Port in the URLs e.g.
The goal:
- I would like to have the services behind ATraefik and BTraefik respond without the Ports in the URL, that is:
Thank you very much for any help with this!
Configurations and Setup:
The setup looks like this:
+----------+
| |
+----------------------+ | ATraefik |
| | | |
| ADomain.com +<--->+----------+
|haproxy |
| BDomain.com +<--->+----------+
| | | |
+----------------------+ | BTraefik |
| |
+----------+
haproxy
frontend https_in
bind *:443
acl host_a hdr(host) -i ADomain.com
acl host_b hdr(host) -i BDomain.com
use_backend a_websecure if host_a
use_backend b_websecure if host_b
backend a_websecure
server a_traeifk a_traefik:444
backend b_websecure
server b_traeifk b_traefik:445
docker-compose:
...
command:
- --log.level=DEBUG
- --api
- --entryPoints.web.address=:81
- --entryPoints.websecure.address=:444
- --entrypoints.web.http.redirections.entrypoint.to=websecure
- --entrypoints.web.http.redirections.entrypoint.scheme=https
- --providers.docker=true
- --providers.docker.exposedByDefault=false
...