Good day, before I venture down the “Help” avenue, I thought I would just check to see if what I have been trying to do is possible.
Currently, I have a couple of apps that I access from outside and the Caddyfile looks like:
service.mydomain.com {
reverse_proxy IP:PORT
}
Using Plex as an example:
plex.mydomain.com {
reverse_proxy 192.168.1.3:32400
}
This works. No problem. Is it only ‘localhost’ and IP addresses that are allowed in the reverse_proxy directive?
Reason for checking into this is because I have been trying to do:
service.internal {
reverse_proxy service.internal:PORT
}
And it never works, but if in a browser I manually enter service.internal:PORT the application comes up.
I am starting to think what I was hoping to accomplish is just not how Caddy works but all this stuff really doesn’t make a lot of sense to me. (Still)
No, you can use any hostname which your system can resolve using DNS (assuming there’s a valid network route to that address).
How did you set up that hostname? What are you using for DNS in your local network? Is the machine you have Caddy running on set up to use your local DNS server to resolve domains?
Remember that .internal
isn’t a public TLD, meaning you can’t get publicly trusted TLS certs for it (i.e. can’t get a certificate from Let’s Encrypt), so you need to add tls internal
to your site to have Caddy issue a certificate using its internal CA instead. This also means you’ll need to install Caddy’s root CA cert onto any devices in your local network that will be connecting to Caddy so that you don’t get errors/warnings about TLS trust.
Next time, please use the Help category and fill out the help topic template. It would help to see your logs, how you installed Caddy, etc. It would save time here.
2 Likes
Good day. Given the response, I will start a new thread in Help as I mentioned I would. A lot of information is requested in that topic and since redacting information is frowned upon, I didn’t want to be posting a bunch of stuff and going through the effort to find out it wasn’t possible. I was not trying to skate around the Help template. I spent last week on PiHole forums making sure it wasn’t DNS (or that I don’t have DNS issues) as that tends to be the culprit.
1 Like