Koozali.org: home of the SME Server

Host multiple .com's on one server.

J Carlson

Host multiple .com's on one server.
« on: December 01, 2001, 10:36:43 PM »
How do you host multiple .com's on a single server, with a single IP address.

Example:  bob.com  joe.com  fred.com

And I need each .com to have a totally different web site.

Thanks
   JC

Dan Brown

Re: Host multiple .com's on one server.
« Reply #1 on: December 01, 2001, 10:41:43 PM »
Set up virtual domains for each, pointed toward their own ibay, and make the appropriate DNS entries.

J Carlson

Re: Host multiple .com's on one server.
« Reply #2 on: December 01, 2001, 10:47:32 PM »
That is were I get confused.  I have only one IP address. And Im not using my own nameserver.  I can make all the .com's point to my IP.  So when somebody types in bob.com and that is resolved to my signel IP address then how does the sever know to server bob's web site?  

Thanks
  JC

Dan Brown

Re: Host multiple .com's on one server.
« Reply #3 on: December 01, 2001, 10:51:55 PM »
It's magic.  (-:

Actually, I don't know all the details, but the HTTP request specifies the name of the server.  Apache sees that, and serves the appropriate information.

Boris

Re: Host multiple .com's on one server.
« Reply #4 on: December 03, 2001, 09:56:09 AM »
It's called Virtual Name Host in apache configuration file.
If you have virtual domains configured in e-smith manager, apache trying to extract info from HTTP header and serve request from i-bay for this virtual domain. If it can't, or you call server directly by its IP, you will get webpage from default (primary) website.