Cannot access dashboard in HTTPS

Hi there,

I'm a beginner to Traeffik and I'm having a few problems accessing the dashboard/API. I wanted to make these accessible only in HTTPS using a wildcard certificate, but the dashboard is not accessible in HTTPS using example.com/dashboard (or /api), and in HTTP it returns a 404 error :thinking:...

Although I've activated the logs, I can't get any results...

I'm assuming that an error is present in my configuration, but I can't seem to locate it.
Last and maybe not least, I'm using Container Station 3

Here's an overview of my compose:

version: '3.3'

services:
  traefik:
    image: "traefik:latest"
    restart: always
    networks:
    - traefik_network
    ports:
    - "80:80"
    - "443:443"
    volumes:
    - /var/run/docker.sock:/var/run/docker.sock:ro
    - /share/CACHEDEV1_DATA/config/traefik/traefik-config.yml:/traefik-config.yml:ro
    - /share/CACHEDEV1_DATA/config/traefik/traefik-dynamic.yml:/traefik-dynamic.yml:ro
    -/share/CACHEDEV1_DATA/acme/*.exemple.com:/etc/certs/wildcard:ro
    - /share/CACHEDEV1_DATA/log/traefik:/var/log/traefik
    labels:
    - "traefik.enable=true"
    - "traefik.http.routers.api.rule=Host(`${TRAEFIK_DOMAIN}`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
    - "traefik.http.routers.api.service=api@internal"
    - "traefik.http.routers.api.middlewares=auth"
    - "traefik.http.middlewares.auth.basicauth.usersfile=${TRAEFIK_AUTH_USER}:${TRAEFIK_AUTH_PASSWORD}"
    - "traefik.http.routers.api.tls=true"
    - "traefik.http.routers.api.entrypoints=https"
    environment:
    - TRAEFIK_DOMAIN=${TRAEFIK_DOMAIN}
    - TZ=${TZ}
    - PUID=${TRAEFIK_UID}
    - PGID=${TRAEFIK_GID}

networks:
  traefik_network:

As well as my configuration file:
traefik-config.yml

log:
  level: DEBUG
  filePath: "/var/log/traefik/traefik.log"

api:
  dashboard: true
  insecure: false

entryPoints:
  http:
    address: ":80"
    http:
      redirections:
        entryPoint:
          to: https
          scheme: https
  https:
    address: ":443"

providers:
  file:
    filename: /traefik-dynamic.yml
    watch: true
  docker:
    watch: true
    exposedByDefault: false
    endpoint: "unix:///var/run/docker.sock"

traefik-dynamic.yml

tls:
  certificates:
    - certFile: "/etc/certs/wildcard/*.exemple.com.cer"
      keyFile: "/etc/certs/wildcard/*.exemple.com.key"

Looking forward to any help that can be provided !
Thanks

You need to mount traefik.yml to one of the expected places or tell Traefik via command: --configFile=/path/traefik.yml the location. (Doc)

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.