NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Majodi on July 01, 2008, 07:33:47 AM

Title: Multiple sites - one server
Post by: Majodi on July 01, 2008, 07:33:47 AM
Is it possible with NetTalk Web Server to run multiple sites (each having their own domain url) on one single server? I know with "normal" servers this is possible.

Majodi
Title: Re: Multiple sites - one server
Post by: Bruce on July 02, 2008, 04:26:52 AM
Hi Majodi,

Although a couple folk have done this, it is not a trivial thing to do (at least not yet.) It's been on my list for a while, and is rapidly getting towards the top I think.

There are a couple things you can do in the meantime, which may help:

a) obviously the 2 servers can run on different ports. It works, but it's not ideal.

b) A server can be assigned multiple IP addresses. If you can get the addresses, then you can "bind" each server to a different ip address (all running on port 80.)

Cheers
Bruce
Title: Re: Multiple sites - one server
Post by: Mike Grigsby on July 15, 2008, 08:18:27 AM
I've been wanting to o the same thing too. It's kind of a must for someone wanting to run a SaaS revenue model.

I haven't found the equivalent yet, but on one of my websites I park a bunch of domains and switch to the domain using the server info in location.hostname. I've been meaning to see if NetTalk has an equivalent because that could be captured and used to route to the right database.

if ( location.hostname == "nonprofitcard.org" ) {
 
   window.location = "/npc/";
 
} else if ( location.hostname == "www.nonprofitcard.org" ) {
 
   window.location = "/npc/";