I updated my Rocky Linux 8.7 to 9.1, on 8.7 my Cockpit worked through Traefik with this YML.
---
http:
routers:
cockpit:
rule: "Host(`cockpit.mywebsite.com`)"
service: cockpit-service
priority: 1000
tls:
certresolver: myresolver
entryPoints:
- websecure
services:
cockpit-service:
loadBalancer:
servers:
- url: "http://192.168.0.54:9090"
...
Now I have this error and when I change the address to 127.0.0.1:9090 I also have a Bad Gateway. My Traefik is under Docker and works perfectly with other containers.