{
# Global options block. Entirely optional, https is on by default
# Optional email key for lets encrypt
email ******@gmail.com
# Optional staging lets encrypt for testing. Comment out for production.
#acme_ca https://acme-staging-v02.api.letsencrypt.org/directory
}
jellyfin.mysite.xyz {
reverse_proxy 0.0.0.0:8096
}
foundry.mysite.xyz {
reverse_proxy 0.0.0.0:30000
}
3. The problem I’m having:
The issue I am having is that it seems that the reverse proxy does not do anything.
When I goto mysite.xyz:1234 I am properly directed to my jellyfin server, but that is because I had that set up in the port forwarding options of my router beforehand.
Similarly, if i go to jellyfin.mysite.xyz:1234 I am brought to jellyfin, however if I only go to jellyfin.mysite.xyz I get a “ERR_EMPTY_RESPONSE” from my web browser.
4. Error messages and/or full log output:
Paste logs/commands/output here.
USE THE PREVIEW PANE TO MAKE SURE IT LOOKS NICELY FORMATTED.
Honestly this is my first foray into webhosting and sysadmin, I do not even know where I would find additional information. I am happy to look up whatever I need to, but at the moment I dont know what I dont know!
Using 0.0.0.0 doesn’t really make sense – that IP address isn’t a real address, it just means “all addresses”. Many HTTP clients end up dialing effectively “localhost” with that though. Using 0.0.0.0 is more useful as a listen address, because it means to listen to all interfaces.
When in Docker, localhost means “this same container”. So trying to reverse_proxy to localhost won’t reach anything, because nothing else is running inside Caddy’s container.
Instead, you need to connect to the other container that’s running your service. Docker has a built-in DNS resolver that lets you connect to other containers by their name. You didn’t show what your other services are in your docker-compose.yml so I can’t tell you what to use, but it should be pretty obvious, just use that service’s name.
can you tell me from here what names I should be using? I am sorry for the basic questions, this is kind of my first foray into docker and networking in general.
If you see a blank page in your browser, open the network tab in your browsers’ developer console.
You might see a status code != 200
Also, the name in your Caddyfile needs to match the container_name (jellyfin) in your docker-compose.
Or if no container_name is set, it needs to match the service name (in your case also jellyfin)
So assuming you didn’t change your Caddyfile since your last Screenshot, you need to either rename container_name to jellyfinstuff or change reverse_proxy jellyfinstuff:8096 to reverse_proxy jellyfin:8096
Hi Indeed,
You are absolutely correct, I should be more clear.
when i attempt to access jellyfin.mysite.xyz i get a “ERR_EMPTY_RESPONSE” as the error, even after making the change you have mentioned.
However, docker decided to cooperate and let me see the real time logs today, and i noticed a “firewall is probably the problem message” which lead me to realize… I never set up to 80 and 443 port forwarding on my router… genius right here.