I think you should read this wiki:
If you want to run a service inside a Local Area Network (LAN) such as your home or office – and especially if you want to be able to access it from outside that network – Caddy can help you accomplish this quite easily. This guide will show you how. It assumes you’ve never done this before, but that you have some technical proficiency and are somewhat knowledgable about your own network.
Do this at your own risk. There are several ways to make private services accessible from other n…
You can’t reverse-proxy to two different services without telling Caddy how to decide which requests go to which service. With that config, only one of them will work, and only on port 443.
You’ll need to either use a subdomain for each service, or use a path matcher to serve each service under their own paths.
For example, here’s a config to use separate subdomains for each service (recommended):
jellyfin.mysite.com {
reverse_proxy 127.0.0.1:8096
}
gotify.mysite.com {
reverse_proxy 192.168.0.70:8070
}
Or subpaths (trickier, requires configuring each service to understand they are behind subpaths, see the thread linked below):
mysite.com {
handle_path /jellyfin* {
reverse_proxy 127.0.0.1:8096
}
handle_path /gotify* {
reverse_proxy 192.168.0.70:8070
}
}
Have you ever tried to reverse proxy an app into its own little subfolder of your domain name?
Makes things neat, doesn’t it? Using example.com/foo/ for one app, example.com/bar/ for another. If you’re coming here from one of the selfhosted communities, you might be thinking along the lines of example.com/sonarr/, example.com/radarr/ etc.
Chances are, you’ve tried some configuration along these lines:
example.com {
redir /sonarr /sonarr/
handle_path /sonarr/* {
reverse_proxy localhost…