Hi,
I have Traefik (2.10.4) running since a while and mainly to Docker containers with Let's Encrypt.
Now I have a container which listen on two ports and I cannot figure out how to it the proper way.
- Port
6749
has a path/admin
(and everything below that path) it listen on (admin UI) - Port
8443
handles all other request/paths
So I want Traefik to:
- https://auth.myorg.net/admin/* to be routed to port 6749
- https://auth.myorg.net/* to be routed to port 8443
docker-compose.yml
(not working)
version: '3.9'
services:
fancy_container:
image: the_fancy_image
container_name: fancy_container
ports:
- 6749:6749
- 8443:8443
labels:
- traefik.enable=true
- traefik.http.services.admin_service.loadbalancer.server.port=6749
- traefik.http.services.admin_service.loadbalancer.server.scheme=https
- traefik.http.routers.admin_service.rule=Host(`auth.myorg.net`)
- traefik.http.routers.admin_service.tls=true
- traefik.http.routers.admin_service.tls.certresolver=le
- traefik.http.routers.admin_service.service=admin_service
- traefik.http.routers.admin_service.middlewares=ipwhitelist
- traefik.http.routers.admin_service.rule=Path(`/admin`)
- traefik.http.middlewares.ipwhitelist.ipwhitelist.sourcerange=127.0.0.1/24, 192.168.1.1/24
networks:
- web
restart: always
networks:
web:
name: web
external: true
Do you have any solution on this?