【问题标题】:Why does https not work in this simple reverse proxy setup with Traefik?为什么 https 在这个使用 Traefik 的简单反向代理设置中不起作用?
【发布时间】:2018-06-06 09:34:18
【问题描述】:

我使用 Traefik 设置了一个反向代理,多个节点在本地网络上运行。一切都适用于 http,但尝试通过 https 连接只是超时。 Traefik 日志不显示任何与 https/acme 相关的错误或消息。任何帮助都会很棒!

debug = false
logLevel = "INFO"
defaultEntryPoints = ["https","http"]

[entryPoints]
    [entryPoints.http]
    address = ":80"
    #[entryPoints.http.redirect]
    #   entryPoint = "https"
    [entryPoints.https]
    address = ":443"
    [entryPoints.https.tls]

[acme]
    caServer = "https://acme-staging-v02.api.letsencrypt.org/directory"
    email = "almar@mydomain.com"
    storage = "/etc/traefik/acme.json"
    entryPoint = "https"
    onHostRule = true
    [acme.httpChallenge]
    entryPoint = "http"


[file]

[frontends]
    [frontends.test1]
        backend = "backend1"
        passHostHeader = true
        [frontends.test1.routes.r0]
        rule = "Host:mydomain.com,test1.mydomain.com"    
    [frontends.test2]
        backend = "backend2"
        passHostHeader = true
        [frontends.test2.routes.r0]
        rule = "Host:test2.mydomain.com"

[backends]
    [backends.backend1]
        [backends.backend1.servers.s0]
        url = "http://test1-hostname:80"    
    [backends.backend2]
        [backends.backend2.servers.s0]
        url = "http://test2-hostname:80"

【问题讨论】:

  • 我可以确认 acme.json 填充了 Traefik 的证书。

标签: lets-encrypt traefik


【解决方案1】:

愚蠢的我;我在运行容器时忘记暴露端口 443 (-p 443:443)...

【讨论】:

    猜你喜欢
    • 2018-08-29
    • 1970-01-01
    • 1970-01-01
    • 2013-05-04
    • 2012-05-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-12-23
    相关资源
    最近更新 更多