1

I installed the traefik v2 in the container, set it up, but when I go to the domain, I get "404 page not found" and not a dashboard.

This is my first time doing this so I'm asking the community for help.

Below are my settings files.

docker-compose.yml

version: '3'
services:
  traefik:
    image: traefik:v2.8
    container_name: traefik
    restart: unless-stopped
    security_opt:
      - no-new-privileges:true
    ports:
      - 80:80
      - 443:443 
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - ./data/traefik.yml:/traefik.yml:ro
      - ./ssl:/ssl
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.traefik.entrypoints=https"
      - "traefik.http.routers.traefik.rule=Host(`traefik.DOMAIN.com`)"
      - "traefik.http.routers.traefik.tls=true"
      - "traefik.http.routers.traefik.tls.certresolver=letsEncrypt"
      - "traefik.http.routers.traefik.service=api@internal"
      - "traefik.http.services.traefik-traefik.loadbalancer.server.port=888"

traefik.yml

entryPoints:
  http:
    address: ":80"
  https:
    address: ":443"

http:
  routers:
    http-catchall:
      rule: hostregexp(`{host:.+}`)
      entrypoints:
      - http
      middlewares:
      - redirect-to-https
  middlewares:
    redirect-to-https:
      redirectScheme:
        scheme: https
        permanent: false

providers:
  docker:
    endpoint: "unix:///var/run/docker.sock"
    exposedByDefault: false

certificatesResolvers:
  letsEncrypt:
    acme:
      email: mail@example.com
      storage: /ssl/acme.json
      caServer: "https://acme-staging-v02.api.letsencrypt.org/directory"
      httpChallenge:
        entryPoint: http
api:
  dashboard: true
  • does this answer you question ? [https://stackoverflow.com/questions/63116661/404-when-trying-to-access-traefik-dashboard/69234980#69234980](https://stackoverflow.com/questions/63116661/404-when-trying-to-access-traefik-dashboard/69234980#69234980) – codeaprendiz Sep 16 '22 at 08:26

0 Answers0