Hello,
that is probably a FAQ, but despite browsing for days, I was not able to make it working. I try to install a redirection from HTTP to HTTPS for all services. My entire traefik.yaml looks like:
log:
level: DEBUG
providers:
docker:
exposedByDefault: false
network: traefik_proxy
entrypoints:
http:
address: ":80"
https:
address: ":443"
http:
routers:
https-redirect:
rule: "HostRegexp(`{any:.*}`)"
entrypoints:
- http
middlewares:
- https-redirect
middlewares:
https-redirect:
redirectScheme:
scheme: https
permanent: true
certificatesResolvers:
le:
acme:
tlschallenge: true
email: "..."
storage: "/letsencrypt/acme.json"
api:
dashboard: true
The containers are configured using docker labels with docker-compose
whoami:
image: "containous/whoami"
container_name: "simple-service"
labels:
- "traefik.enable=true"
- "traefik.http.routers.whoami.rule=Host(`whoami.invalid.org)"
- "traefik.http.routers.whoami.entrypoints=https"
- "traefik.http.routers.whoami.tls.certresolver=le"
They work fine, when using https directly.
However, when using http, I just get 404. What's still wrong with my configuration?
Thanks a lot!