我尝试以简单的方式通过子域traefik
(traefik.DOMAIN.com
)访问traefik。当我获得访问权限时,SSL证书运行良好,但无法访问 Jmeter 板(404错误)
停靠-编写.yml
version: '3'
services:
reverse-proxy:
image: traefik:v2.2
container_name: traefik
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- $PWD/traefik.toml:/etc/traefik/traefik.toml
- $PWD/acme.json:/acme.json
restart: always
labels:
- "traefik.enable=true"
- "traefik.http.routers.api.rule=Host(`traefik.DOMAIN.com`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
- "traefik.http.routers.api.service=api@internal"
- "traefik.http.routers.api.entrypoints=websecure"
networks:
- web
networks:
web:
external: true
交通工具
[api]
dashboard = true
[entryPoints]
[entryPoints.web]
address = ":80"
[entryPoints.web.http]
[entryPoints.web.http.redirections]
[entryPoints.web.http.redirections.entryPoint]
to = "websecure"
scheme = "https"
[entryPoints.websecure]
address = ":443"
[entryPoints.websecure.http.tls]
certResolver = "default"
[providers]
[providers.docker]
watch = true
exposedByDefault = false
network = "web"
[certificatesResolvers]
[certificatesResolvers.default]
[certificatesResolvers.default.acme]
email = "EMAIL@gmail.com"
storage = "acme.json"
caServer = "https://acme-v01.api.letsencrypt.org/directory"
[certificatesResolvers.default.acme.tlsChallenge]
关于如何让这个工作有什么想法吗?我希望最终能够在一个子域上安装owncloud
1条答案
按热度按时间yhxst69z1#
在阅读了文档并检查了调试模式下的日志后,我能够使它工作。这里的
key
是尾随的/
,也就是mandatory
。交通工具
停靠-编写.yaml
文件
型
下面是截图