I would like to change the context path for the Traefik dashboard from e.g. https://apps.example.com/
to https://apps.example.com/traefik
, as I have Heimdall routed to https://apps.example.com/
. All the examples I could find are for Traefik 1.x. What would be the easiest way to do this? My current config (which doesn't work):
traefik.toml:
[entryPoints]
[entryPoints.web]
address = ":80"
[entryPoints.web.http.redirections.entryPoint]
to = "websecure"
scheme = "https"
[entryPoints.websecure]
address = ":443"
[api]
dashboard = true
insecure = true
[log]
level = "DEBUG"
[certificatesResolvers.cloudflare.acme]
email = "email@email.com"
storage = "acme.json"
[certificatesResolvers.cloudflare.acme.dnsChallenge]
provider = "cloudflare"
resolvers = ["1.1.1.1:53", "8.8.8.8:53"]
[providers.docker]
watch = true
network = "web"
exposedByDefault = false
endpoint = "unix:///var/run/docker.sock"
[providers.file]
filename = "traefik_dynamic.toml"
traefik_dynami.toml:
[http.routers.api]
rule = "Host(`apps.example.com`) && Path(`/traefik`)"
entrypoints = ["websecure"]
service = "api@internal"
[http.routers.api.tls]
certResolver = "cloudflare"
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…