Heyo-
Im having an issue with the redirectscheme middleware.
Im doing the http->https redirect per container for reasons, and all the https listeners and certs work perfectly... What doesnt work, are all of my host rules. when I access hxxp://DOMAIN1 i get redirected to hxxps://DOMAIN1 as expected... but when I access hxxp://www.DOMAIN1 hxxp://DOMAIN2 or hxxp://www.DOMAIN2 i get 404 errors, and the logs show that I am not hitting any rules.
My docker-compose is below, does anyone have any ideas?
(excuse the hxxp stuff, i'm new, and the system doesn't want me to post URLs.)
- - [17/Apr/2023:13:38:10 +0000] "GET / HTTP/1.1" 404 19 "-" "-" 915 "-" "-" 0ms
version: '3.3'
services:
php:
volumes:
- './site:/var/www/html'
build: .
restart: "unless-stopped"
labels:
traefik.enable: true
traefik.http.routers.containername-php.entrypoints: web
traefik.http.routers.containername-php.rule: "Host(`DOMAIN1`) || Host(`www.DOMAIN1`) || Host(`DOMAIN2`) || Host(`www.DOMAIN2`)"
traefik.http.routers.containername-php.middlewares: containername-php
traefik.http.middlewares.containername-php.redirectscheme.scheme: https
traefik.http.routers.containername-php.entrypoints: websecure
traefik.http.routers.containername-php.rule: "Host(`DOMAIN1`) || Host(`www.DOMAIN1`) || Host(`DOMAIN2`) || Host(`www.DOMAIN2`)"
traefik.http.routers.containername-php.tls: true
traefik.http.routers.containername-php.tls.certresolver: production
networks:
- traefik-internal
networks:
traefik-internal:
name: traefik-internal
external: true