[英]traefik permissions 777 for acme.json are too open, please use 600
[英]Traefik initialization is failed in docker container with acme.json . “Receiving Error creating TLS config: private key was nil”
我試圖用acme.json設置Traefik,但是在容器啟動時,我得到以下錯誤
level=error msg="Cannot unmarshall private key []"
level=error msg="Error creating TLS config: private key was nil"
level=fatal msg="Error preparing server: private key was nil"
docker run -d \
-v /var/run/docker.sock:/var/run/docker.sock \
-v $PWD/traefik.toml:/traefik.toml \
-v $PWD/acme.json:/acme.json \
-p 80:80 \
-p 443:443 \
-l traefik.frontend.rule=Host:abc.com\
-l traefik.port=8080 \
--network proxy \
--name traefik \
traefik:1.3.6-alpine --docker
defaultEntryPoints = ["http", "https"]
[web]
address = ":8080"
[web.auth.basic]
users = ["admin:$apr1$fwifc.Nx$xfuaGzJ6Jzdf347PQzxD95"]
[entryPoints]
[entryPoints.http]
address = ":80"
[entryPoints.http.redirect]
entryPoint = "https"
[entryPoints.https]
address = ":443"
[entryPoints.https.tls]
[acme]
email = "abc@msn.com"
storage = "acme.json"
entryPoint = "https"
onHostRule = true
onDemand = false
根據文檔,您還可以將“ tls證書 ”放置在全局配置文件traefik.toml中,而不是這樣:
[entryPoints.https.tls]
[[entryPoints.https.tls.certificates]]
CertFile = "integration/fixtures/https/snitest.com.cert"
KeyFile = "integration/fixtures/https/snitest.com.key"
[[entryPoints.https.tls.certificates]]
CertFile = "integration/fixtures/https/snitest.org.cert"
KeyFile = "integration/fixtures/https/snitest.org.key"
請也遵循本教程 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.