/etc/hosts file for a multi-homed, multi-domain machine?
- by threecheeseopera
I have a server (debian) with two network interfaces that I would like to host multiple services and domains on; it is not entirely clear to me how the hosts file should be set up.
Example:
eth0, bound to WAN interface 1.2.3.4:
mail.example.com
www.example.com
eth0:1, bound to WAN interface 1.2.3.5:
www.other-domain.com
eth1, bound to LAN 192.168.1.123:
some-clever-hostname
What should my hosts file look like? (including localhost,localhost.localdomain, etc.)
Should I use DNS for some of these entries? Which ones?
Thanks!