Multiple Domains, Different Local Servers

(Gene Kennett) #1

I want to host multiple domains with two local servers. Is the below example how this is supposed to work? I also want to have subdomains for each domain. I currently just have a bunch of subdomains going to a bunch of different servers.

Example: {
proxy /
} {
proxy /
} {
proxy /


(Matthew Fay) #2

Hi @Polybius, welcome to the Caddy community. Looks like you’ve got the general idea down pat.

You say you’re running two servers. Are you running Caddy on both servers, or just running Caddy on one server and proxying to services on two servers?

(Gene Kennett) #3

Yeah, I’m already running it with a bunch of subdomains, each with it’s own service (SABNZBd, Sonarr, etc…).

I have Caddy just running on one server and was hoping I could run two domains that sit behind the same public IP but each on it’s own local IP (or same IP but different port each, should be the same config either way).

Thanks for your help!

(Gene Kennett) #4

@Whitestrake, still able to help?

(Matthew Fay) #5

Did you give it a shot? Are you running into any problems?

(Gene Kennett) #6

Actually, it’s working fine, I’m just a little bit dumb. I was expecting it to automatically go to HTTPS when I tried the address. Thanks for your help!

1 Like