Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

VwTdi09

macrumors newbie
Original poster
May 28, 2009
18
0
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 :)
 

belvdr

macrumors 603
Aug 15, 2005
5,945
1,372
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.