【问题标题】:Can the traefik dashboard be setup to listen over HTTPS?traefik 仪表板可以设置为通过 HTTPS 侦听吗?
【发布时间】:2018-11-01 22:10:57
【问题描述】:

我可以通过http://localhost:8080/ 访问我的仪表板,这很棒。但是,如果我想在https://localhost:8080/(或其他一些端口,比如 8443)访问它怎么办。我该怎么做?

我试过了:

  [entryPoints.traefik]
  address = ":8080"
    [entryPoints.traefik.tls]
      [[entryPoints.traefik.tls.certificates]]
      certFile = "C:/Certs/server.crt"
      keyFile = "C:/Certs/server.key"

但是,这似乎并没有改变任何东西。我仍然可以通过 http 访问,但尝试使用 https 时出现错误“此站点无法提供安全连接”。

这似乎没有记录在任何地方,所以也许不可能?

【问题讨论】:

  • 您能否更新您的描述以添加您从 Traefik 开始时的完整配置和日志。

标签: traefik


【解决方案1】:

确保您的配置正确:

defaultEntryPoints = ["http"]

[entryPoints]
  [entryPoints.http]
  address = ":80"

 [entryPoints.foo]
   address=":8080"
  [entryPoints.foo.tls]
      [[entryPoints.foo.tls.certificates]]
      certFile = "C:/Certs/server.crt"
      keyFile = "C:/Certs/server.key"

[api]
entrypoint="foo"

https://docs.traefik.io/configuration/api/#authentication

您的证书必须与您的域匹配。

【讨论】:

  • 谢谢!看起来该配置正在运行。不知道我的第一次尝试出了什么问题。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-09-14
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多