My server has two IP addresses, and I want two Apache services listening to each one separately. The DNS has this:
- a CNAME alias pointing 'intranet' to servername
- a Host (A) record pointing servername to IP 1
- a Host (A) record pointing 'dev' to IP 2
I have an Apache service running with Listen intranet:80
, but it has decided to listen on IP 1 and IP 2, so I can't start the second service. How did it even get to IP 2 when the path through DNS should just lead it to IP 1? My guess is that it resolves to 127.0.0.1 and then binds to all IPs available. If that's the case, will Listen IP1:80
actually force it not to use IP 2, or will the same logic apply and it will use all available IPs? If the latter, is there actually a way to configure Apache to only listen on IP 1? (I only ask rather than experiment, because this is a live system and I don't want to cause more downtime than I need to.)