traefik-docker/conf.d/purearthsupplies.yml
2025-06-16 09:43:15 +08:00

33 lines
745 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

http:
routers:
main-https:
rule: &host_rule "Host(`purearthsupplies.com`) || Host(`www.purearthsupplies.com`)"
entryPoints:
- websecure
service: main-service
tls:
certResolver: myresolver
main-http-redirect:
rule: *host_rule
entryPoints:
- web
middlewares:
- redirect-to-https
service: noop
services:
main-service:
loadBalancer:
servers:
- url: "http://107.174.127.105:3000"
noop:
loadBalancer:
servers:
- url: "http://127.0.0.1:65535" # 占位用无实际后端仅用于HTTP跳转
middlewares:
redirect-to-https:
redirectScheme:
scheme: https
permanent: true