I am trying to use Traefik as a reverse proxy, where requests are reaching my home server via a Cloudflare tunnel. I have Traefik up and running locally (e.g. when I do not go through the Cloudflare tunnel, things are working just fine). However, when going through the Cloudflare tunnel I am always getting a 404. I have tried so many things, but just can't figure it out.
Cloudflare
The tunnel is setup to route all my requests to port 80 on my local server (http://192.x.x.x.:80), which is where Traefik is running.
Traefik
My global setup and entrypoints
global:
checkNewVersion: true
sendAnonymousUsage: false
serversTransport:
insecureSkipVerify: true
entryPoints:
http:
address: :80
# HTTPS endpoint, with domain wildcard
https:
address: :443
My route
http:
## EXTERNAL ROUTING ##
routers:
overseerr:
middlewares:
- redirecthttps
entryPoints:
- https
rule: 'Host(`example.example.com`)'
service: overseerr
tls: true
services:
# Overseer service
overseerr:
loadBalancer:
servers:
- url: http://<localip>:<port>
middlewares:
redirecthttps:
redirectScheme:
scheme: "https"
permanent: true
Does anyone know why I keep getting a 404 when routing through the Cloudflare tunnel? I do see that my certificate is valid when going over HTTPS, so I am assuming the HTTP to HTTPS redirection is not working somehow.