In Latest Traefik has an old error

Hi all.
I saw that people asked a question about such an error on the forum. But I still didn't understand how the solution was found.
And I got such an error.

404 page not found

---

services:
  traefik:
    image: traefik:latest
    container_name: traefik
    restart: unless-stopped
    security_opt:
      - no-new-privileges:true
    # networks:
    #    proxy:
    ports:
      - 80:80
      - 443:443

    environment:
      - CF_API_EMAIL=*****@gmail.com
      - CF_DNS_API_TOKEN=*********e2A_m
      # - CF_API_KEY=YOU_API_KEY
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - /mnt/AppsPool/traefik/traefik.yml:/traefik.yml:ro
      - /mnt/AppsPool/traefik/acme.json:/acme.json
      - /mnt/AppsPool/traefik/config.yml:/config.yml:ro
      - /mnt/AppsPool/traefik/logs:/var/log/traefik

    labels:
      traefik.enable: true
      traefik.http.routers.dashboard.entrypoints: "http"
      traefik.http.routers.traefik.rule: "Host(`traefik-dashboard.domainname.com`)"
      traefik.http.middlewares.traefik-auth.basicauth.users: "admin:******Gi55zIYTrBO"
      traefik.http.middlewares.traefik-https-redirect.redirectscheme.scheme: "https"
      traefik.http.middlewares.sslheader.headers.customrequestheaders.X-Forwarded-Proto: "https"
      traefik.http.routers.traefik.middlewares: "traefik-https-redirect"
      traefik.http.routers.traefik-secure.entrypoints: "https"
      traefik.http.routers.traefik-secure.rule: "Host(`traefik-dashboard.domainname.com`)"
      traefik.http.routers.traefik-secure.middlewares: "traefik-auth"
      traefik.http.routers.traefik-secure.tls: true
      traefik.http.routers.traefik-secure.tls.certresolver: "cloudflare"
      traefik.http.routers.traefik-secure.tls.domains[0].main: "domainname.com"
      traefik.http.routers.traefik-secure.tls.domains[0].sans: "*.domainname.com"
      traefik.http.routers.traefik-secure.service: "api@internal"


# networks:
#   proxy:
#     name: proxy
#     external: true

and traefik.yml

api:
  dashboard: true
  debug: true
entryPoints:
  http:
    address: ":80"
    http:
      redirections:
        entryPoint:
          to: https
          scheme: https
  https:
    address: ":443"
serversTransport:
  insecureSkipVerify: true
providers:
  docker:
    endpoint: "unix:///var/run/docker.sock"
    exposedByDefault: false
#    network: proxy
  file:
    filename: /config.yml
certificatesResolvers:
  cloudflare:
    acme:
      email: ******@gmail.com
      storage: acme.json
      dnsChallenge:
        provider: cloudflare
        resolvers:
          - "1.1.1.1:53"
          - "1.0.0.1:53"

log:
  level: "INFO"
  filePath: "/var/log/traefik/traefik.log"
accessLog:
  filePath: "/var/log/traefik/access.log"

I hope if someone can suggest a solution to this problem

Either your request goes to the wrong server, IP or port. Or Traefik can not match the request to a rule (usually domain, path). Or the target service does now know the host or path.

Enable and check Traefik debug log (doc) and Traefik access log in JSON format (doc).

Check in access log in JSON format if requests arrive at Traefik and if the error status is returned by the target service (OriginStatus) or only by Traefik (DownstreamStatus).

The same error pops up even if I try to log in via an external IP address. And via a local one. The error is the same. So the problem is not in the domain name. Or am I wrong?

You can not access Traefik with an "external IP address", unless you have specified that in a router.rule. You will always get a 404 error, because there is no matching rule (with the IP) to the request.

Enable and check Traefik debug log (doc) and Traefik access log in JSON format (doc).

Check in access log in JSON format if requests arrive at Traefik and if the error status is returned by the target service (OriginStatus) or only by Traefik (DownstreamStatus).