为什么https在Traefik的这个简单的反向代理设置中不起作用?

时间:2018-06-06 09:34:18

标签: lets-encrypt traefik

我已经在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"

1 个答案:

答案 0 :(得分:0)

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