使用Namecheap的Traefik docker DNS挑战不起作用

时间:2018-11-10 06:39:57

标签: docker dns traefik

Traefik.toml

defaultEntryPoints = ["http","https"]

[web]
address = ":8080"

[entryPoints]
  [entryPoints.http]
  address = ":80"
  [entryPoints.http.auth.forward]
  address = "http://forward-oauth:4181"
    [entryPoints.http.redirect]
      entryPoint = "https"
  [entryPoints.https]
  address = ":443"
    [entryPoints.https.tls]
[docker]
endpoint="unix:///var/run/docker.sock"
domain="docker.localhost"
watch=true
exposedByDefault = false

[acme]
email = "tim@tim.com"
storage = "acme.json"
caServer = "https://acme-staging-v02.api.letsencrypt.org/directory"
entryPoint = "https"
[acme.dnsChallenge]
provider = "namecheap"
delayBeforeCheck = 0

[[acme.domains]]
  main = "*.tim.com"
  sans = ["timelfelt.com"]

[file]

[backends]
  [backends.backend1]
    [backends.backend1.servers.server1]
       url = "http://192.168.192.116"

[frontends]
  [frontends.frontend1]
      backend = "backend1"
      passHostHeader = true
      [frontends.frontend1.routes.adfs]
          rule = "Host:adfs.blah.com"

我在Traefik泊坞窗日志中收到一条错误消息:

time =“ 2018-11-10T06:29:28Z” level = error msg =“无法获得域\” .tim.com,tim.com \“的ACME证书:无法生成通配符域“” .tim.com,tim.com \”的ACME提供程序中的证书:ACME需要DNS挑战”

namecheap API和用户名均在主机上设置。 80和443也可用。

1 个答案:

答案 0 :(得分:0)

未定义DNS质询配置时出现错误import lombok.Data;

ACME配置是静态配置的一部分,因此在更改此部分时,您需要停止并重新启动Traefik。

https://docs.traefik.io/v1.7basics/#configuration