Listening on specific interfaces

I have a server with two network interfaces (eth0, eth1) with different IPs. How do I get Caddy to only listen on one of them?

Try using the bind directive with the IP address of the interface you want to use.

Ah yeah that looks like what I want. Not sure how I missed it!

I also found you can use ip namespaces to control how any program listens.

1 Like

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