Я использую Traefik 2.0.7. У меня проблемы с поиском правильной конфигурации.
Я хочу перенаправить трафик c в приложение tomcat:
http://www.someurl.com -> https://www.someurl.com/app
Что происходит:
http://www.someurl.com -> https://www.someurl.com/ -> http://www.someurl.com/app ( нет https)
traefik.yaml:
entryPoints:
web:
address: ':80'
web-secure:
address: ':443'
http:
middlewares:
https-redirect:
redirectScheme:
scheme: https
providers:
file:
directory: '/etc/traefik/conf.d'
watch: true
#log:
# level: DEBUG
api:
insecure: true
dashboard: true
# debug: true
certificatesResolvers:
le-staging:
acme:
app.yaml:
http:
routers:
app-router:
entryPoints:
- 'web-secure'
middlewares:
- 'app-replace'
- 'app-header'
service: 'app-service'
rule: 'Host(`www.someurl.com`)'
tls:
certResolver: 'le-staging'
middlewares:
app-replace:
replacePathRegex:
regex: "^/$"
replacement: "/app/"
app-header:
headers:
sslRedirect: true
services:
app-service:
loadBalancer:
servers:
- url: 'http://ip-address:8080'