Redirect DNS to different port with traefik
I've done something similar, and it would look this on your setup
docker-compose.yml
service: traefik: labels: - "treafik.port=8080" - "traefik.enable=true" - "traefik.backend=traefik" - "traefik.docker.network=traefik_front" - "traefik.frontend.rule=Host:traefik.${DOMAIN}" - "traefik.webservice.frontend.entryPoints=https" zabbix-web-apache-mysql: labels: - "traefik.port=80" - "traefik.enable=true" - "traefik.backend=zabbix-web" - "traefik.passHostHeader=true" - "traefik.docker.network=traefik_front" - "traefik.frontend.rule=Host:zabbix.${DOMAIN}" grafana: labels: - "traefik.port=3000" - "traefik.enable=true" - "traefik.backend=grafana" - "traefik.passHostHeader=true" - "traefik.docker.network=traefik_front" - "traefik.frontend.rule=Host:grafana.${DOMAIN}"
and the way my traefik.toml is configured
InsecureSkipVerify = true ## This is optional ## Force HTTPS[entryPoints] [entryPoints.http] passHostHeader = true address = ":80" [entryPoints.http.forwardedHeaders] insecure = true [entryPoints.http.proxyProtocol] insecure = true ## This seems to be an absolute requirement for redirect ## ...but it redirects every request to https [entryPoints.http.redirect] entryPoint = "https" [entryPoints.traefik] address = ":8080" [entryPoints.traefik.auth.basic] # the "user" password is the MD5 encrpytion of the word "pass" users = ["user:$apr1$.LWU4fEi$4YipxeuXs5T0xulH3S7Kb."] [entryPoints.https] passHostHeader = true address = ":443" [entryPoints.https.tls] ## This seems to be an absolute requirement [entryPoints.https.forwardedHeaders] insecure = true [entryPoints.https.proxyProtocol] insecure = true