traefik v2 仪表板基本身份验证无法在 AWS elb 后面工作

traefik v2 dashboard basic auth not working behind AWS elb

我有 traefik v2 设置,当我尝试访问 AWS elb 后面的仪表板时,基本身份验证不起作用。但是当我直接点击 traefik 时,同样的配置有效

我的配置是这样的

version: '3.5'

services:
  traefik:
    image: traefik:v2.2
    container_name: traefik
    restart: always
    command:
      - "--api.insecure=true"
      - "--providers.docker=true"
    networks:
      - traefik_network
    ports:
      - "80:80"
      - "8080:8080"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    labels:
       - "traefik.enable=true"
       - "traefik.docker.network=traefik_network"       
       - "traefik.http.services.traefik.loadbalancer.server.port=8080"
       - "traefik.http.routers.traefik.rule=Host(`traefik.local.host`)"
       - "traefik.http.routers.traefik.middlewares=traefik"
       - "traefik.http.middlewares.traefik.basicauth.users=test:$$apr1$pmerTx$$qsMzjTuYTHyEn12LKmteghC."
       - "traefik.http.middlewares.traefik.basicauth.removeheader=true"

networks:
  traefik_network:
     name: traefik_network

当我落后于 AWS elb 时,我需要做什么才能对 traefik v2 仪表板进行基本身份验证???

问题出在我身上,一切看起来都不错,但我需要使用端口 80,而不是 8080!!!

version: '3.5'

services:
  traefik:
    image: traefik:v2.2
    container_name: traefik
    restart: always
    command:
      - "--api.insecure=true"
      - "--providers.docker=true"
    networks:
      - traefik_network
    ports:
      - "80:80"
      - "8080:8080"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    labels:
       - "traefik.enable=true"
       - "traefik.docker.network=traefik_network"       
       - "traefik.http.services.traefik.loadbalancer.server.port=80"
       - "traefik.http.routers.traefik.rule=Host(`traefik.local.host`)"
       - "traefik.http.routers.traefik.middlewares=traefik"
       - "traefik.http.middlewares.traefik.basicauth.users=test:$$apr1$pmerTx$$qsMzjTuYTHyEn12LKmteghC."
       - "traefik.http.middlewares.traefik.basicauth.removeheader=true"

networks:
  traefik_network:
     name: traefik_network