Run caddy http/https server on a specific ip address

Hi,
Suppose I have a vm with multiple interfaces and ip addresses. I want to run caddy http/https server on a specific ip address so that it listens to only that ip address. How can I do that?

For example, my machine has two public ips 1.1.1.1 and 2.2.2.2. I want to run one caddy server on 1.1.1.1 with configuration for customer1 and run another caddy server on 2.2.2.2 with configuration for customer2. They may serve the same domains.

Have a look at the bind directive:

https://caddyserver.com/docs/bind

Thanks! I got it.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.