Dashboard authentication using middleware kept failing

I kept getting prompt to enter login/password for the dashboard.

  • "traefik.http.routers.traefik-rtr.middlewares=chain-basic-auth@file"
  • '/volume1/docker/shared:/shared'
    The shared folder contains the .htpasswd file with the login/password.

http:
middlewares:
middlewares-basic-auth:
basicAuth:
# users:
# - "theboss:$1apr1$ZziXpSDM$1ip8pDeH0Tgj/LJCkXmXa."
usersFile: "/shared/.htpasswd"
realm: "Traefik 2 Basic Auth"

Any help will be very much appreciated.