Hi @robertgranholm, welcome to the Caddy community. We all started somewhere!
In this case, you’ve run straight into one of the most prevalent obstacles people face when trying to reverse proxy apps - the “subfolder problem”. You’ll hit this regardless of what program you use as a reverse proxy, because it’s a logical problem, not a bug in the web server or the app itself.
Just about every app is written under the assumption that it is being served at the web root, i.e. example.com/
- but in your case, it isn’t. You’re only serving it at example.com/sonarr
.
So when the app tries to serve you CSS and JS assets, which it needs to render the site, it tells your browser to grab /foo.css
and /bar.js
instead of /sonarr/foo.css
and /sonarr/bar.js
. Caddy doesn’t know it has to forward these on to Sonarr, so it throws back a 404, and your app doesn’t render properly.
Sonarr actually has a setting you can use to configure the subfolder - like most apps that are configurable in this way, the setting is referred to as a “URL base”. You can find it at http://192.168.178.5:8989/settings/general - in your case, set it to /sonarr
and then go to System and restart the app.
For apps that don’t have a URL base option, your only (edit: straightforward, at least, other methods are possible but difficult and complicated) workaround is to serve them on a subdomain instead of a subfolder and let them have their assumed web root.