Koozali.org: home of the SME Server

How do these Virtual Domains work

laurie_lewis

How do these Virtual Domains work
« on: August 28, 2005, 06:31:09 AM »
Hi all,

Please excuse my ignorance in this area.  I have no experience here and I am just seeing what I have to do to host mulitple domains on my home server.  Looking at possibility of doing a number of things from the one server but with different web addresses.  I believe that virtual domains are what I need to do.  So,  am trying to get my head around how virtual domains work and what I need to do with my ISP.  I apologise if this is a bit off topic for contribs.

I know that I can define virtual domains in Server Manager and that I can create ibays for each of them so they contain their own files etc.  I can also make these domains accessible from the internet or accessible only from my local network.  My understanding is that in this way each each domain can  have its own unique web site with its own purpose eg. retail/education/family etc.   Each domain has its own name:-

domain1.com    associated ibay - primary  -  accessible from internet
domain2.com    associated ibay - domain2 -  accessible from internet
domain3.com    associated ibay - domain3 - accessible from internet
domain4.com    associated ibay - domain4 - no access from internet

I have a fixed ip address A.B.C.D.  If I go to this address I get the web page for domain1.com located in the primary ibay.  At this time I have no registed domains so I am just using the ip address.  If I want to look at domain2 I am putting in A.B.C.D/domain2/index.html and I get the web page for that domain.  The same goes for the rest of the virtual domains that are accessible from the internet.


So, if I want to use these different domain names (yet to be determined) do I go to my ISP and register the domain name(s) that I want to use and they then do the following for me:-

www.registered_domainname1.com = A.B.C.D
www.registered_domainname2.com = A.B.C.D/domain2
www.registered_domainname3.com = A.B.C.D/domain3

Have I got this right or am I way off course.  

Similarly, I then make my mail server open to the internet and it can handle mail for each of the domains that have been created.  This mail can then be forwarded to the necessary people.

Any assitance or experiences here would be much appreciated.

Laurie

Offline crazybob

  • *****
  • 894
  • +0/-0
    • Stalzer R&D
How do these Virtual Domains work
« Reply #1 on: August 28, 2005, 07:31:50 AM »
Hi Lauri,

All you have to do is register the domain names, and have them pointed to your ip. Tinydns, which is part of SME, will take care of the rest. As long as you have don the proper assoications, and have alowed them to be accessable. As Charlie Brady told me a couple of years ago when I asked the same question, "Its really that easy"

Bob
 :pint:
If you think you know whats going on, you obviously have no idea whats going on!

laurie_lewis

How do these Virtual Domains work
« Reply #2 on: August 28, 2005, 08:58:10 AM »
Thanks Bob,

Now if I understand what you have told me, it simply means that you can register as many domains as you like and you have them all point at the same ip address.  SME is then smart enough to differentiate and point them to the correct ibay(virtual domain).

OK - at present my router (Billion) is set up to act as a virtual firewall and it fowards all requests on port 80 to SME.  will this impact upon the transperancy or will I have to change anything else?

I am assuming I can do the same for FTP etc.

Have yet to look at the email side but anything you can add would be good.

Laurie

Offline raem

  • *
  • 3,972
  • +4/-0
How do these Virtual Domains work
« Reply #3 on: August 28, 2005, 02:19:38 PM »
laurie_lewis

> Have yet to look at the email side but anything you can add would be good.

It also "just works".
Mail will automatically be accepted for all virtual domains.
In sme 6.x there is only one user set, so you need to configre aliases, see
http://mirror.contribs.org/smeserver/contribs/rmitchell/smeserver/howto/virtual%20domain%20email%20aliases%20HOWTO%20for%20sme%20server.htm
...

Offline judgej

  • *
  • 375
  • +0/-0
How do these Virtual Domains work
« Reply #4 on: August 28, 2005, 02:46:45 PM »
All the domains point to the same IP address - they are all equivalent. When you FTP, send mail to the server or SSH into it, the server has no idea which domain you used to access it - it just gets the IP address.

Where the virtual domains do come in, is when web pages are requested from your server. As a part of the HTTP protocol, web browsers or other clients will not only request a page from your webserver (i.e. its IP address) but part of the request will also state which domain it is requesting it from. That way the request is diverted to the correct i-bay according to the domain.

-- Jason
-- Jason