Help with Caddy, Plex and Cloudflare

There’s lots of ways this could be misconfigured, depending on exactly what kind of behaviour you want to achieve. Based on your other proxies in the original post, I’m guessing specifically that you want to proxy requests beginning with /qbit to your qBittorrent listener located at http://10.0.0.6:8080.

Putting aside the difficulty you’ll likely experience trying to “jail” qBittorrent to a subfolder, this part:

proxy / qbit 10.0.0.6:8080

Probably doesn’t do what you’re expecting. The proxy directive’s format is proxy [from] [to...]. That means the above is proxying all requests received (based on the catch-all /), and it’s sending them to two different upstreams - qbit and 10.0.0.6:8080. To be unambiguous, Caddy treats those as http://qbit:80 and http://10.0.0.6:8080.

I’d expect the former to be popular in Docker environments where DNS resolves container hosts by service name, and the latter in hand-configured private networking, but seeing the two together along with the fact that I doubt you’re load-balancing qBittorrents heavily implies that this is a misconfiguration.

Also, this part:

Also missed the logic outlaid in my post you linked:

You can see in the top example of that post that I used 443, and in the bottom example I used 4488 - as opposed to 9292 of the other OP’s qBittorrent listener.

So it looks like instead of using the port your browser connects on, you’ve given the port that the qBittorrent listener is on. That’s not the role that the X-Forwarded-Host header serves; it’s meant to provide information about the first request, the one issued by the original client - not the final destination. If they don’t match up, qBittorrent has a conniption, because the developers are opinionated about that kind of thing.

This is all assuming that you don’t in fact, as an end-user of your system, browse to example.com:8080 to access your services.