【发布时间】:2018-03-24 18:27:11
【问题描述】:
当为 traefik 使用 docker 后端时,我们只为主域生成加密证书,而不为任何子域生成。我已遵循本指南:Docker and Lets Encrypt。主域具有来自 Let encrypt 的证书。运行带有标签的 docker 容器时,不会生成证书。
Docker 版本 = 17.10,Traefik 版本 = traefik:1.5
这是我的 traefik.toml 配置:
defaultEntryPoints = ["http", "https"]
[web]
address = ":8080"
[entryPoints]
[entryPoints.http]
address = ":80"
[entryPoints.http.redirect]
entryPoint = "https"
[entryPoints.https]
address = ":443"
[entryPoints.https.tls]
[acme]
email = "email@example.com"
storage = "acme.json"
entryPoint = "https"
[acme.httpChallenge]
entryPoint = "http"
OnHostRule = true
[docker]
endpoint = "unix:///var/run/docker.sock"
domain = "example.com"
watch = true
exposedbydefault = false
这是我正在使用的标签:
"traefik.backend": "test",
"traefik.docker.network": "proxy",
"traefik.enable": "true",
"traefik.frontend.rule": "Host:test.example.com",
"traefik.port": "8000"
example.com 上的证书是:
Issued to: example.com
Issued by: Lets Encrypt Authority X3
test.example.com 上的证书是:
Issued to: TRAEFIK DEFAULT CERT
Issued by: TRAEFIK DEFAULT CERT
有谁知道我做错了什么?
【问题讨论】:
-
Lets-encrypt 仅发给:example.com。 traefik 是否运行 cert-bot 来生成证书?
标签: docker ssl lets-encrypt traefik