# Dashboard 404 even on official example

**URL:** <https://community.traefik.io/t/dashboard-404-even-on-official-example/18915>\
**Category:** Traefik v2\
**Tags:** dashboard-api, docker\
**Created:** [June 9, 2023, 5:59pm UTC](https://community.traefik.io/t/dashboard-404-even-on-official-example/18915 "2023-06-09T17:59:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SterhTG](https://avatars.discourse-cdn.com/v4/letter/s/bbe5ce/32.png) [@SterhTG](https://community.traefik.io/u/SterhTG)\
**Post date:** [June 9, 2023, 5:59pm UTC](https://community.traefik.io/t/dashboard-404-even-on-official-example/18915/1 "2023-06-09T17:59:33Z")

</div>

Hello community!  
I checked lot of posts with dashboard access, but I cannot make it work even with example from docs.  
Currently I use traefik 2.10.1. I want to make dashboard available on secure port(443) with authentication. Now I simplify it to get dashboard on http port.  
If I enable insecure, then dashboard works.

Here is my config file:

```auto
providers:
  docker:
# allowEmptyServices: true
    exposedByDefault: false

api:
  dashboard: true

log:
  level: DEBUG

################################################################
# Entrypoint
################################################################
entryPoints:
  web:
    address: ":80"
  websecure:
    address: ":443"

certificatesResolvers:
  resolver:
    acme:
      email: support@my-domain.com
      storage: /etc/traefik/acme/acme.json
      httpChallenge:
        entryPoint: web
  letls:
    acme:
      email: support@my-domain.com
      storage: /etc/traefik/acme/acme.json
      tlsChallenge: {}

```

My docker-compose:

```auto
version: '3.5'

services:
  traefik:
    hostname: traefik
    image: traefik:v2.10.1
    container_name: traefik
    restart: always
    domainname: my-domain.com
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./traefik.yml:/etc/traefik/traefik.yml:ro
      - /etc/localtime:/etc/localtime:ro
      - ./letsencrypt-acme:/etc/traefik/acme:rw
      - /var/run/docker.sock:/var/run/docker.sock:ro
    labels:
#Current config. Simplified
      - "traefik.enable=true"
      - "traefik.http.routers.dashboard.rule=Host(`my-domain.com`)"
      - "traefik.http.routers.dashboard.service=api@internal"

#Prev config found on Github that I should add port for LB
# - traefik.enable = true
# - traefik.http.routers.api.rule="Host(`my-domain.com`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
# - traefik.http.routers.api.entrypoints=websecure
# - traefik.http.routers.api.service=api@internal
# - traefik.http.services.dummy.loadBalancer.server.port=65535

#Initial config with tls
# - traefik.http.routers.api.tls=true
# - traefik.http.routers.api.rule="Host(`my-domain.com`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
# - traefik.http.routers.api.entrypoints=websecure
# - traefik.http.routers.api.tls.certresolver=resolver # Also I try to use letls
# - traefik.http.routers.api.service=api@internal

    networks:
      apps_net:

networks:
  apps_net:
    external: true

```

I checked container labels with docker inspect they are intact. Try to connect with curl -404, browser confirm this.  
Please help me to fix this.

---

<div class="post-metadata">

**Author:** ![bluepuma77](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bluepuma77](https://community.traefik.io/u/bluepuma77)\
**Post date:** [June 9, 2023, 6:20pm UTC](https://community.traefik.io/t/dashboard-404-even-on-official-example/18915/2 "2023-06-09T18:20:04Z")

</div>

You need to assign one of your certificatesResolvers to the entrypoint or the router, see [simple Traefik example](https://github.com/bluepuma77/traefik-best-practice/tree/main/docker-traefik-dashboard-letsencrypt).

---

<div class="post-metadata">

**Author:** ![SterhTG](https://avatars.discourse-cdn.com/v4/letter/s/bbe5ce/32.png) [@SterhTG](https://community.traefik.io/u/SterhTG)\
**Post date:** [June 9, 2023, 6:46pm UTC](https://community.traefik.io/t/dashboard-404-even-on-official-example/18915/3 "2023-06-09T18:46:01Z")

</div>

Thanks [bluepuma77](https://community.traefik.io/u/bluepuma77) you save my night!  
To solve http connection I added entrypoint and that solve it.  
Correct config

```auto
      - "traefik.enable=true"
      - "traefik.http.routers.dashboard.rule=Host(`my-domain.com`)"
      - "traefik.http.routers.dashboard.service=api@internal"
      - "traefik.http.routers.dashboard.entrypoints=web"

```

For HTTPS EntryPoint and certificateResolver

```auto
      - "traefik.enable=true"
      - "traefik.http.routers.dashboard.rule=Host(`my-domain.com`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
      - "traefik.http.routers.dashboard.entrypoints=web"
      - "traefik.http.routers.dashboard.middlewares=dashboard-https
      - "traefik.http.middlewares.dashboard-https.redirectscheme.scheme=https"
      - "traefik.http.routers.dashboard-secure.entrypoints=websecure"
      - "traefik.http.routers.dashboard-secure.rule=Host(`my-domain.com`) && PathPrefix(`/api`, `/dashboard`)"
      - "traefik.http.routers.dashboard-secure.tls=true"
      - "traefik.http.routers.dashboard-secure.service=api@internal"
      - "traefik.http.routers.dashboard-secure.tls.certresolver=letls"

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/containo/original/2X/b/bd81ebdb578656e76e56ff3cc3eed021d3ba132d.png) [@system](https://community.traefik.io/u/system)\
**Post date:** [June 12, 2023, 6:46pm UTC](https://community.traefik.io/t/dashboard-404-even-on-official-example/18915/4 "2023-06-12T18:46:28Z")

</div>

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