On my OS X server, I run 3 domains and within that 6 separate websites - www.mydomain.com for wiki, www.mydomain.com.au for my company website ( drupal cms), crm.mydomain.com.au (sugarcrm CE) , webmail.mydomain.com for roundcube, and www.anotherdomain.com.au for another commercial site within my business.
In addition - I have a www2.mydomain.com.au for my dev system for the drupal site.
Simple Steps in Server.app By the way see the doco at
https://help.apple.com/advancedserveradmin/mac/10.8/ for Mountail Lion OS X server Advanced Admin.
1. set the internet host name
2. set DNS records
3. Add the web sites
4. add the info at your Domain Management Service
5. Optional add mail virtual domains as well.
The way to do it in Server.app is the following.
1. pick the domain name for your server that you wish to use and Edit the Host Name in Server.app - Select your Server in the Left Window, Select Network in the right and click edit host name and then make sure you tick hostname for internet on the way through. - if computer name is Server, then hostname should be server.dens0n.com for example. Don't worry about the commercial domain names as yet.
2. Start setting up DNS locally in Server.app
Select DNS from the list of services, and turn on.
Don't forget to add the address of your router as the forwarding domain server.
From memory, your primary zone should be set up , but if not, add a new record for the primary zone - dens0n.com
Add a machine record - Domain dens0n.com, Host Name "server" and ip Address - your internal ethernet address for your server (assuming its plugged into network via a router.
If planning to host mail
Add an MX record - Zone: dens0n.com , Mail Server "server.dens0n.com" Priority - 5 / 10 - whatever if its your only one.
Add a Nameserver record for the Zone dens0n.com - Nameserver "server.dens0n.com"
Add an Alias record to the Zone dens0n.com - Host name "www" - Destination "dens0n.com"
OK, that concludes setting up dens0n.com as your main domain.
2.a . Now, still in DNS, lets add a primary zone record for "thepetshop.co.uk"
Then add a Machine Record for that Zone
Zone : "thepetshop.co.uk"
Host Name "thepetshop.co.uk"
IP Address: For now - go with the same ip address as your main ethernet address on your server - i.e. the same ip address as you used for dens0n.com.
2b. If you are going to host mail for thepetshop.co.uk - go ahead and add an MX record
Zone: "thepetshop.co.uk"
Mail Server "server.dens0n.com"
2c. Add a www alias + a testweb alias ( just for example purpose)
Zone : thepetshop.co.uk
Host Name "www"
Destination "thepetshop.co.uk"
Zone : thepetshop.co.uk
Host Name "testweb"
Destination "thepetshop.co.uk"
Ok - so now we have set up two primary zones (dens0n.com and thepetshop.co.uk), weve added a name server rec, two MX records, and 3 alias records.
3. Web Sites.
Just a note. If you are going to use wiki - then it will take over the "Default web site".
The server will automatically set up a default Web Site on port 80 and a default SSL site on port 443 for whatever the hostname is. - so externally typing www.dens0n.com or server.dens0n.com will take you to the default web site.
To add your other websites in server.app (www.thepetshop.co.uk and testweb.thepetshop.co.uk) do the following
3. a Add a record - Click +
Domain Name - enter "thepetshop.co.uk" without the ""'s
Note - if you have set up dns correctly on your server, the little light will go Green - if it stays red, you have a problem.
IP Address - choose any and port 80
SSL None
Store Site Files In : - Choice here is automatically create folder - or navigate to one - I choose auto setup normally, and it creates a folder the same as the domain name entered in /Your path to Server/Web/Data/Sites
Whio can access - Anyone
Additional Domains - Edit and add a new record - www.thepetshop.co.uk
Edit Advanced Settings as required.
3. b - Go ahead and add a new website for testweb.thepetshop.co.uk.
3.c. To get your local machines to access the different web sites, you will need to change their DNS server to be the tcp / ip address of your server. Hopefully, youve added the forwarding server to the DNS setup so anything not serverd by your server - goes to the router and out to the internet.
Step 4. Set up yoour DNS Management Service Nameservers.
Youll need to add your A records and your MX records for your domains and point them to your external ip.
You should all be set.
Cheers
Gerry