Host(`traefik.localhost`) && (PathPrefix(`/dashboard`) || PathPrefix(`/api`))
The router matches requests to dashboard on traefik.localhost
host header, and 404 means that there is not matching rule. Perhaps you are not using traefik.localhost
host header in your request.
I just used your configuration as posted, and I added the loadbalancer external ip to the local hosts file:
external-ip traefik.localhost
Then I ran curl: curl http://traefik.localhost/dashboard/
I've got the html content as expected.
If I change traefik.local
to traefik
in both the hosts file and the dashboard.yml and re-apply dashboard.yml I also can see the dashboard in the browser at http://traefik/dashboard/