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):
- example.com -> IP_1
- www.example.com -> IP_1
- test.example.com -> IP_2
- admin.example.com -> IP_3
www.example.com will be the production site. test.example.com will be the bleeding edge version of the site, used for testing, and admin.example.com will expose a number of site administration services (e.g. SSH, rsyncd). Both www and test will be locked down to port 80. Both test and admin will only accept traffic from certain IPs.
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 listening IP:PORT per VirtualHost. But, are they other services (or limitations) I should be aware of when connecting to my server via "foo.mydomain.com" if the machine's hostname is "randomname"?