How does hostname relate to IP address on a server with multiple public IPs?

view full story

http://serverfault.com – My hosting provider set up an Ubuntu-based virtual private server for me with three public IPs. I want to assign hostnames to those IPs as follows (I'm be using Dyn as my DNS): mydomain.com -> IP_1 *.mydomain.com -> IP_1 foo.mydomain.com -> IP_2 bar.mydomain.com -> IP_3 I'm a little confused about the difference between the hostnames DNS deals with, and the server's hostname (as seen when running `hostname' on the server's command line). Where does the server's hostname come into play? My guess is that Apache 2 doesn't care what the `hostname' utility returns, because I can specify listen (HowTos)