我正在尝试让Traefik在AKS中正常工作。总体而言,它工作得很好,但是我无法让ACME证书工作。下面附上了我的traefik.toml配置,在上面我找不到任何奇怪的东西。
在这个用例中,提到的3个域都是虚拟的,因为它们实际上是存在的,并且也是回复的
# traefik.toml
logLevel = "info"
defaultEntryPoints = ["http","https"]
[entryPoints]
[entryPoints.http]
address = ":80"
compress = true
[entryPoints.https]
address = ":443"
compress = true
[entryPoints.https.tls]
[[entryPoints.https.tls.certificates]]
CertFile = "/ssl/tls.crt"
KeyFile = "/ssl/tls.key"
[entryPoints.traefik]
address = ":8080"
[ping]
entryPoint = "http"
[kubernetes]
[traefikLog]
format = "json"
[acme]
KeyType = "RSA4096"
email = "pimjansen@domain.com"
storage = "/acme/acme.json"
entryPoint = "https"
onHostRule = true
acmeLogging = true
[acme.httpChallenge]
entryPoint = "http"
[[acme.domains]]
main = "traefik.domain.com"
[[acme.domains]]
main = "elasticsearch.domain.com"
[[acme.domains]]
main = "kibana.domain.com"
[api]
entryPoint = "traefik"
dashboard = true我收到的实际错误是这样的:
{"level":"error","msg":"Unable to obtain ACME certificate for domains \"traefik.hardstyletop40.com\" : unable to generate a certificate for the domains [traefik.domain.com]: acme: Error -\u003e One or more domains had a problem:\n[traefik.domain.com] acme: error: 400 :: urn:ietf:params:acme:error:connection :: Fetching http://traefik.hardstyletop40.com/.well-known/acme-challenge/mYkyJzIM-6Y2UIknhXpCkUUTZWjzsAeMuqx7eDCZloY: Error getting validation data, url: \n","time":"2019-09-11T14:47:13Z"}关于挑战的详细信息:
"challenges": [
{
"type": "http-01",
"status": "invalid",
"error": {
"type": "urn:ietf:params:acme:error:connection",
"detail": "Fetching http://traefik.domain.com/.well-known/acme-challenge/mYkyJzIM-6Y2UIknhXpCkUUTZWjzsAeMuqx7eDCZloY: Error getting validation data",
"status": 400
},
"url": "https://acme-v02.api.letsencrypt.org/acme/chall-v3/293838266/LPH2sA",
"token": "mYkyJzIM-6Y2UIknhXpCkUUTZWjzsAeMuqx7eDCZloY",
"validationRecord": [
{
"url": "http://traefik.domain.com/.well-known/acme-challenge/mYkyJzIM-6Y2UIknhXpCkUUTZWjzsAeMuqx7eDCZloY",
"hostname": "traefik.hardstyletop40.com",
"port": "80",
"addressesResolved": [
"13.79.159.165"
],
"addressUsed": "13.79.159.165"
}
]
},提前感谢
发布于 2019-09-25 17:29:01
letsencrypt的工作原理是在您指定的How服务器上的.well-known目录中放置一个文件。你是说它们是假的,所以你可能是在本地做?在任何情况下,如果在the服务器上找不到自动生成的文件,则无法验证证书是从"owning“域请求的。
流程的工作方式大大简化了:
<代码>H117如果需要加密->修改few服务器配置<代码>H218<代码>G219
现在,如果您正在使用虚拟域,而不是在活动服务器上,则上述过程将在步骤3失败,这将导致步骤5失败,这将导致您得到一个错误。
另一种方法是,如果无法在set服务器上运行命令来生成证书,则可以设置DNS记录密钥进行验证。
sudo certbot -d your.dummy.com --manual --preferred-challenges dns certonly这将为您提供一个代码,您需要将其放入域服务器上的txt记录中

完成后,您可以在letsencrypt应用程序中确认您已经设置了记录并继续。
简而言之,如果您无法在you服务器上运行命令来生成证书,或者无法修改dns记录,则无法通过letsencrypt获取证书。
https://stackoverflow.com/questions/57891977
复制相似问题