Api@internal not reachable

Hi,

i am trying to expose the traefik dashboard to "traefik.localhost" but all I a 404 error.

Can someone help please?

docker-compose:

version: '3'
services:
  treafik:
    image: traefik:2.0
    container_name: traefik
    hostname: traefik
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ${PWD}/traefik.yml:/etc/traefik/traefik.yml
    ports:
      - 80:80
      - 443:443
      - 8080:8080

traefik.yaml

## traefik.yml

# Docker configuration backend
providers:
  docker:
    exposedByDefault: false

# API and dashboard configuration
api:
  dashboard: true

http:
  routers:
    dashboard:
      rule: "Host(`traefik.localhost`)"
      service: "api@internal"

accessLog: {}

Hello @Phill93,

The Traefik dashboard runs in secure mode by default:

https://docs.traefik.io/v2.0/operations/dashboard/#secure-mode

You can see it working in insecure mode in this example: https://docs.traefik.io/v2.0/user-guides/docker-compose/basic-example/

But be aware that it should be run in secure mode if you intend to use it in an internet-facing environment.