1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

Hosting multiple sites on Leopard Server

Discussion in 'Mac OS X Server, Xserve, and Networking' started by p2desai, Jul 7, 2008.

  1. macrumors newbie


    I'm a little confused with the sites pane under Server Admin/Web Services in Leopard Server. I don't know too much about hosting websites, and my confusion stems from a lack of general knowledge more than anything else.

    First ... what does hosting multiple sites mean and how does it exactly work? I don't understand how I can specify an IP address for each site... am I just supposed to be able to make up an IP for each site (this doesn't work)? This doesn't make too much sense to me.

    I'm on an intranet and the server / clients all have static IPs.
  2. macrumors newbie

  3. macrumors newbie

    Forgot to mention the overall concept about it... Basically OS X serv er uses Apache for the web server, apache allows you to configure something called VirtualHosts, this allows you to point a specific web address to a given folder on the computer. The web address or host name has to be properly routed to your computer for this to work. Say I want to host both blah.com and foo.com on one server, i register both domains and point them to the IP address of my server (i'm sticking to a basic configuration here, that only uses one ip). now if virtual hosts aren't configured, the default page or your home page will show up the same for both sites. lets say blah.com webroot is located at /www/public/blah and foo.com is located at /www/public/foo (note that these are arbitrary locations that I made up) when you configure virtual hosts, you need to set one up for blah.com and foo.com and point them to the specific folder. Take a look at http://httpd.apache.org/docs/1.3/vhosts/ if you are hosting only on your intranet, having multiple domains or host names point to one machine would require some sort of DNS trick that i couldn't tell you how to do. an alternative option would be to use subdomains and create virtual hosts for each sub-domain. for example you could have blah.servername and foo.servername and route each of those to their specific folders for each site using virtualhosts... forgive me for my bit of ambiguity with respect to the solution, my background is primarily in hosting from linux (using apache), so that is the only reason I don't use the GUI.

Share This Page