Traefik - 无法通过 https 连接
Traefik - Can't connect via https
我正在尝试 运行 在 Raspberry Pi Docker Swarm 上使用 Traefik(特别是遵循 OpenFaaS 项目中的本指南 https://github.com/openfaas/faas/blob/master/guide/traefik_integration.md)但是 运行在实际尝试通过 https 连接时遇到了一些麻烦。
具体有两个问题:
1) 当我连接到 http://192.168.1.20/ui 时,系统提示我输入用户名/密码。但是,不接受由 htpasswd 生成并在下面 docker-compose.yml 中使用的详细信息(未经哈希处理的密码)。
2) 访问 https 版本 (http://192.168.1.20/ui) 根本无法连接。如果我尝试使用我在 --acme.domains
中设置的域进行连接,情况也是如此
当我浏览 /etc/
时,我发现 /etc/traefik/
目录不存在,但应该创建,所以这也许是我问题的根源?
我docker-compose.yml
的相关部分看起来像
traefik:
image: traefik:v1.3
command: -c --docker=true
--docker.swarmmode=true
--docker.domain=traefik
--docker.watch=true
--web=true
--debug=true
--defaultEntryPoints=https,http
--acme=true
--acme.domains='<my domain>'
--acme.email=myemail@gmail.com
--acme.ondemand=true
--acme.onhostrule=true
--acme.storage=/etc/traefik/acme/acme.json
--entryPoints=Name:https Address::443 TLS
--entryPoints=Name:http Address::80 Redirect.EntryPoint:https
ports:
- 80:80
- 8080:8080
- 443:443
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "acme:/etc/traefik/acme"
networks:
- functions
deploy:
labels:
- traefik.port=8080
- traefik.frontend.rule=PathPrefix:/ui,/system,/function
- traefik.frontend.auth.basic=user:password <-- relevant credentials from htpasswd here
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 20
window: 380s
placement:
constraints: [node.role == manager]
volumes:
acme:
非常感谢任何帮助。
Let's Encrypt 的 TLS 质询(默认)不再有效。
您必须改用 DNS 质询 https://docs.traefik.io/configuration/acme/#dnsprovider。
我正在尝试 运行 在 Raspberry Pi Docker Swarm 上使用 Traefik(特别是遵循 OpenFaaS 项目中的本指南 https://github.com/openfaas/faas/blob/master/guide/traefik_integration.md)但是 运行在实际尝试通过 https 连接时遇到了一些麻烦。
具体有两个问题:
1) 当我连接到 http://192.168.1.20/ui 时,系统提示我输入用户名/密码。但是,不接受由 htpasswd 生成并在下面 docker-compose.yml 中使用的详细信息(未经哈希处理的密码)。
2) 访问 https 版本 (http://192.168.1.20/ui) 根本无法连接。如果我尝试使用我在 --acme.domains
当我浏览 /etc/
时,我发现 /etc/traefik/
目录不存在,但应该创建,所以这也许是我问题的根源?
我docker-compose.yml
的相关部分看起来像
traefik:
image: traefik:v1.3
command: -c --docker=true
--docker.swarmmode=true
--docker.domain=traefik
--docker.watch=true
--web=true
--debug=true
--defaultEntryPoints=https,http
--acme=true
--acme.domains='<my domain>'
--acme.email=myemail@gmail.com
--acme.ondemand=true
--acme.onhostrule=true
--acme.storage=/etc/traefik/acme/acme.json
--entryPoints=Name:https Address::443 TLS
--entryPoints=Name:http Address::80 Redirect.EntryPoint:https
ports:
- 80:80
- 8080:8080
- 443:443
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "acme:/etc/traefik/acme"
networks:
- functions
deploy:
labels:
- traefik.port=8080
- traefik.frontend.rule=PathPrefix:/ui,/system,/function
- traefik.frontend.auth.basic=user:password <-- relevant credentials from htpasswd here
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 20
window: 380s
placement:
constraints: [node.role == manager]
volumes:
acme:
非常感谢任何帮助。
Let's Encrypt 的 TLS 质询(默认)不再有效。
您必须改用 DNS 质询 https://docs.traefik.io/configuration/acme/#dnsprovider。