I have recently switched to traefik as a reverse proxy for a view self hosted services (from nginx), everything is dockerized and I was able to migrate all my services by attaching the Traefik labels to the docker configs.
However I fail do expose the traefik dashboard itself as a subdomain using tls, I can only access it through local lan access. I'm trying like this.
static config
api:
dashboard: true
insecure: true
certificatesResolvers:
myresolver:
acme:
email: "XXX"
storage: "/letsencrypt/acme.json"
tlsChallenge: {}
entryPoints:
websecure:
address: ":443"
providers:
docker:
endpoint: "unix:///var/run/docker.sock"
exposedByDefault: false
docker-compose
traefik:
image: "traefik:latest"
container_name: "Traefik"
restart: unless-stopped
ports:
- "443:443"
- "8080:8080"
labels:
- "traefik.http.routers.dashboard.rule=Host(`proxy.<MY DOMAIN>`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
- "traefik.http.routers.dashboard.service=api@internal"
- "traefik.http.routers.dashboard.entrypoints=websecure"
- "traefik.http.routers.dashboard.tls=true"
- "traefik.http.routers.dashboard.tls.certResolver=myresolver"
volumes:
- traefik_data:/letsencrypt
- $CONFIG_ROOT/traefik/traefik.yml:/etc/traefik/traefik.yml
- "/var/run/docker.sock:/var/run/docker.sock:ro"
This is what I get in the logs:
time="2023-03-20T13:42:38Z" level=debug msg="Serving default certificate for request: \"proxy.<MY DOMAIN>\""
time="2023-03-20T13:42:38Z" level=debug msg="http: TLS handshake error from <IP>:51985: EOF"
Any helps appreciated.