Search code examples
traefik

How to redirect to the dashboard from a URL?


I currently access the V2 dashboard through http://traefik.my.server:8080/dashboard/ (Traefik runs in a docker container and 8080 is exposed to the host). I would like to change that so that the dashboard is available at http://traefik.my.server/dashboard

I tried to add the following labels to configure this behavior but I get a 404 when accessing http://traefik.my.server/dashboard

- traefik.http.routers.dashboard.rule=Host(`traefik.my.server:`) && Path(`/dashboard`)
- traefik.http.services.dashboard.loadbalancer.server.port=8080
- traefik.http.routers.dashboard.entryPoints=http

(the http entrypoint is port 80)

What is the correct way to set up such redirectio


Solution

  • Recommend read:

    FYI it's not redirection but a routing.

    https://community.containo.us/t/how-to-redirect-to-the-dashboard-from-a-url/4082/2