Multiple hostnames on OS X Server

in macOS edited January 2014
Is it possible - well I'm sure it must be of course but I'm not sure how- to set up multiple hostnames on OS X Server (10.3)?

The setup program that runs after you install it only lets you set one hostname - the example it gives is or

What if I want a different hostname for each service running on the machine, eg

Apache ->

Mail (POP, SMTP or both) ->

FTP ->


MySQL ->

etc. etc.

Do I need to edit a config file to do this, and if so could someone please point me in the right direction, or is the a GUI way of doing it?



  • Reply 1 of 4
    With what you sketched out there, all you would have to do is have your DNS server point those names at your machine. Then configure each of the services normally. The only one that does any self redirection would be apache, and you would just have to make sure you have the correct name in httpd.conf.
  • Reply 2 of 4
    Thanks. I see. Just one thing - httpd.conf doesn't seem to have anything in it relating to hostnames??

    Do I just edit /etc/hostconfig instead?

    set HOSTNAME to so that Apache can use that and all the other services don't need to be edited?
  • Reply 3 of 4
    eugeneeugene Posts: 8,254member
    You can edit the ServerName line in your httpd.conf... or even better, make your own VirtualHost entry.

    This is all academic though. As long as you have set-up your zone right via your DNS provider, you'll be fine. You just have to tell the DNS provider to send *.whatever.domain to your IP. All the services will be listening on their respective ports, so it doesn't really matter if you type ftp://ftp.blah or http://www or http://oogabooga.blah...
  • Reply 4 of 4
    As Eugene pointed out, the line in httpd.conf you are looking for is ServerName. The reason you might need to do this is because sometimes Apache tells clients to go to another file on the same server, and it will give out the name that you have in ServerName (or whatever it decided that should be). This can get tricky when you have multiple names (especially on multiple NIC's). Since you sketched uot only having a single name for web stuff, you can simply fill in the one ServerName and be done with things.
Sign In or Register to comment.