我的域名jstock.co
DNS和SSL证书由Cloudflare处理。
我有以下traefik.toml
defaultEntryPoints = ["http", "https"]
[web]
address = ":8080"
[web.auth.basic]
users = ["admin:xxx"]
[entryPoints]
[entryPoints.http]
address = ":80"
[entryPoints.http.redirect]
entryPoint = "https"
[entryPoints.https]
address = ":443"
[entryPoints.https.tls]
[[entryPoints.https.tls.certificates]]
CertFile = "/app/cert.pem"
KeyFile = "/app/key.pem"
通过上述设置,traefik能够重新路由以下流量以更正docker容器
https://notification.jstock.co/info/
https://iex.jstock.co/info/
https://intrinio.jstock.co/info/
现在,我们已经购买了另一个域名wenote.me
。 Cloudflare也处理了它的DNS和SSL证书。
我想知道是否有可能重用现有的Traefik,以处理来自wenote.me
的流量?如果是这样,traefik.toml
应该是什么样?
答案 0 :(得分:0)
这是完成的方式。
defaultEntryPoints = ["http", "https"]
[web]
address = ":8080"
[web.auth.basic]
users = ["admin:xxx"]
[entryPoints]
[entryPoints.http]
address = ":80"
[entryPoints.http.redirect]
entryPoint = "https"
[entryPoints.https]
address = ":443"
[entryPoints.https.tls]
[[entryPoints.https.tls.certificates]]
CertFile = "/app/cert.pem"
KeyFile = "/app/key.pem"
[[entryPoints.https.tls.certificates]]
CertFile = "/app/wenote.me.cert.pem"
KeyFile = "/app/wenote.me.key.pem"