Hi,
I tried to do a global http to https redirect like described here:
The redirect is working, but I only get 404 pages delivered now.
Help much appreciated.
part of trafik.yml:
api:
dashboard: true
entryPoints:
web:
address: ":80"
http:
redirections:
entryPoint:
to: websecure
scheme: https
websecure:
address: ":443"
providers:
docker:
network: proxy
certificatesResolvers:
letsencrypt:
acme:
email: mymail
storage: acme.json
tlsChallenge: {}
# httpChallenge:
# entryPoint: http
pilot:
token: "my token"
whoami compose file:
version: "3"
services:
whoami:
# A container that exposes an API to show its IP address
image: traefik/whoami
container_name: whoami
networks:
- proxy
labels:
- traefik.http.routers.whoami.rule=Host(`whoami.example.de`)
- traefik.http.routers.whoami.entrypoints=websecure
- traefik.http.routers.whoami.tls=true
- traefik.http.routers.whoami.tls.certresolver=letsencrypt
networks:
proxy:
external: true
traefik compose:
version: "3"
services:
traefik:
image: "traefik:${TAG}"
container_name: traefik
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./config/traefik.yml:/traefik.yml
- ./letsencrypt/acme.json:/acme.json
- "/var/run/docker.sock:/var/run/docker.sock:ro"
networks:
- proxy
- default
labels:
# Dashboard
- "traefik.http.routers.traefik.rule=Host(`traefik.example.de`)"
- "traefik.http.routers.traefik.entrypoints=websecure"
- "traefik.http.routers.traefik.service=api@internal"
- "traefik.http.routers.traefik.middlewares=auth"
- "traefik.http.routers.traefik.tls.certresolver=letsencrypt"
# echo $(htpasswd -nb user password) | sed -e s/\\$/\\$\\$/g
- "traefik.http.middlewares.auth.basicauth.users=admin:mypass"
networks:
proxy:
external:
name: proxy
default:
driver: bridge
UPDATE: updated config files