【发布时间】:2019-05-27 08:25:24
【问题描述】:
我有 Traefik (traefik:1.7.11-alpine) 在 Docker 容器中运行,其中包含许多使用 Let's Encrypt 请求证书来保护它们的服务。这就像一个魅力。
我还启用了 Treafik Web 控制台,但未向外界公开。换句话说,它在 localhost 上运行。在日志文件中,我看到 Traefik 正在尝试为 localhost 请求证书。这是正常的吗?我可以禁用它吗?
这是错误信息
time="2019-05-27T07:03:45Z" level=error msg="Unable to obtain ACME certificate for domains \"localhost\" detected thanks to rule \"PathPrefixStrip:/traefik;Host:localhost\" : unable to generate a certificate for the domains [localhost]: acme: error: 400 :: POST :: https://acme-v02.api.letsencrypt.org/acme/new-order :: urn:ietf:params:acme:error:malformed :: Error creating new order :: DNS name does not have enough labels, url: "
我觉得奇怪的是 Web 控制台在 8080 上运行,并且无论如何都没有链接到 https 入口点。所以我想 Traefik 在确定它需要为哪个端点请求证书时会忽略。
这是我正在使用的配置:
logLevel = "DEBUG"
[traefikLog]
[accessLog]
[accessLog.filters]
statusCodes = ["0-600"]
[entryPoints]
[entryPoints.http]
address = ":80"
[entryPoints.http.redirect]
entryPoint = "https"
[entryPoints.https]
address = ":443"
[entryPoints.https.tls]
minVersion = "VersionTLS12"
cipherSuites = [
"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
"TLS_RSA_WITH_AES_256_GCM_SHA384"
]
[entryPoints.traefik]
address=":8080"
[entryPoints.traefik.auth]
[entryPoints.traefik.auth.basic]
users = ["admin:$apr1$HR4Hj/Zy$fPwTS8LMBqKPpzdzGkyTa/"]
[api]
entrypoint="traefik"
dashboard = true
debug = false
[docker]
watch = true
exposedbydefault = false
domain = "domain.com"
network = "web"
[acme]
email = "info@domain.com"
storage = "acme.json"
entryPoint = "https"
onHostRule = true
[acme.httpChallenge]
entryPoint = "http"
【问题讨论】:
标签: lets-encrypt traefik