PDA

View Full Version : Need Help With DNS and Multiple Websites on My SL Mac Mini




VwTdi09
Mar 9, 2010, 05:47 PM
I took the plunge and bought a Mac Mini server back in October (running SL server) and it's pretty much a sandbox for me to learn how to administer the different services and get things going.

Here is the latest project that I'm stuck with and need any help I can get:
1. The most basic. I want to be able to host multiple websites (with different) domains privately. Webdesign has always been an interest of mine and setting up the web server is tied in. I can use Server Admin to set up the two sites but I'm having trouble accessing them. Can someone provide a basic example of how this is done?

2. With two websites set up, I want to give them each a DNS name for easy navigation during web development. I've already configured my Airport Extreme to look to the Mac Mini as its primary DNS host and I have the DNS server running but entering records correctly seems to be a bit out of my reach.

Any information or pointers would be greatly appreciated :)



satcomer
Mar 9, 2010, 08:29 PM
Well I can point you to a guide at AFP548.com (http://www.afp548.com/) (you should bookmark this site for OS X server news/tips) called Client Management with Mac OS X Server (http://www.afp548.com/filemgmt_data/files/mcx_mm_setup.pdf). It is for server 10.4.x but should give you a general idea.

belvdr
Mar 9, 2010, 08:47 PM
There are two ways to do this: VirtualHost and secondary IPs.

VirtualHosts utilize one IP on the server, and the web server examines the URL the client sends to determine which site is being accessed. You would setup a VirtualHost for each website and possibly a default one (labeled as *) to send people if they type in the IP address. I tend to shy away from this in a production environment as it increases the load on the web server. For development of several lightly accessed web sites, this won't matter.

The other method is to add secondary IPs to the network interface and bind each website to a different IP. This adds no load to the system, but you do have to configure each website to be on a different IP. The downside here is that you use more IPs from your subnet, including the public IPs if you are making these sites truly web accessible.

There's also a mixture of the two, such as using the primary IP of the machine for management of the box and allocating one or more secondary IPs and use the VirtualHost directive to split the websites on that secondary IP.

The Apache web documentation is very good about detailing this.