Using Megabrowser as a Web server

Megabrowser WWW service

How the Megabrowser WWW service handles requests

There are two places where your domain names should be stored. First it is the Megabrowser server so it can resolve the domain names’ to IP addresses. Second it is your Megabrowser so its WWW service can determine which host site is to be used to handle each request.

You can setup as many sites as you desire with your Megabrowser.  Each site will look independent to Internet users. When an HTTP request sent by a browser is handled the following imaginable tree is used to determine which content should be returned back to the user.

  • Port number 1 (i.e. 80)
    • Site 1 (named "WWW Site 13")
    • Domain name 1(i.e. site1.megabrowser.com)
      • Domain name 2(i.e. cars.megabrowser.com)
    • Site 2 (named "My WWW favorite Site")
    • Domain name 1(i.e. supersite.megabrowser.com)
  • Port number 2 (i.e. 82)
    • Site 3 (named "Nice Site")
    • Domain name 1(i.e. nice.megabrowser.com)
    • Site 4 (named "Another nice Site")
      • No domain names.

The "WWW Site 13" site is chosen to be the default.

If all Megabrowser sites are set up as defined in the tree above, Megabrowser will listen to ports 80 and 82 for requests. When a browser sends its request to one of these ports, the subtree corresponding to this port is used (except some circumstances described below).

Let’s suppose that the user has entered supersite.megabrowser.com in his browser (any browser) and that you own this site and that you have already purchased the supersite.megabrowser.com sub domain. The following will happen:

1) The Internet user enters http://supersite.megabrowser.com into a browser (not necessary Megabrowser).  To fulfill the user’s request to view this site, the system tries to determine where the supersite.megabrowser.com site is located. To achieve this the system (in response to the user’s browser request) determines that megabrowser.com is in the Megabrowser server’s control and competence. Then the system asks the Megabrowser server specifically where the sub domain supersite.megabrowser.com is located so it can access it. Providing your computer is on and your Megabrowser is “Online”, the Megabrowser server knows your website is available and knows your Internet address (IP address).  It responds with the information necessary for the Internet user to access your site.  Then your Megabrowser and the user’s Megabrowser connect peer-to-peer.

Note:  If the Internet user is using MegaBrowser or Internet Explorer (where MegaBrowser is installed) to browse the Internet then yoursupersite.megabrowser.com website can be accessed by its short name http://supersite.dom or http://www.supersite.dom.

2) The user’s browser then establishes a peer-to-peer connection to port 80 of your computer (default for HTTP) and sends a request containing supersite.megabrowser.com as the Host field’s value of the header of the HTTP request.

3) When Megabrowser WWW service receives such request from the port 80, it walks through sites associated with this port and compares host names associated with each site with supersite.megabrowser.com found in the Host field.

4) Megabrowser discovers that this host name corresponds to “My WWW favorite Site”.

5) Megabrowser handles the other part of the requested URL and since there is no additional information in the URL (no relative paths and parameters), it simply returns the default document of the site to the Internet user’s browser.  Many people call their default document index.html or default.html.

Process simplified:

A web surfer enters http://supersite.megabrowser.com into his browser.  The surfer’s browser sends a request to the MegaBrowser Server asking it which host computer contains the http://supersite.megabrowser.com site.  The Megabrowser server responds with the host computer’s Internet address.  The surfer’s Megabrowser now knows the address of the host and makes a request directly to that host computer. The host computer’s Megabrowser determines which specific website should be accessed and allows the surfer’s browser to access it.

Let's now explore other situations.

Let’s suppose that the user has entered wow.megabrowser.com. If you have purchased this sub domain too (wow), the browser again will send a request to your computer’s port 80 and steps 1-3 will be the same as above. But when Megabrowser discovers that no site is set up to handle wow.megabrowser.com, it will access “WWW Site 13” to handle the request since this is the chosen default site in your WWW service properties.

If the request is made to any port other than the port where the default site is located, almost everything is the same, but determining the default site is slightly different.  Here are the two scenarios:

Scenario 1 - If the default site is assigned to the port where the request was received the sequence of candidates to handle the request is the following:

  1. The site containing the requested host in its list of domains
  2. The default site

Scenario 2 - If the default site is assigned to a port that is different than the port where the request was received the sequence of candidates to handle the request is the following:

  1. The site containing the requested host in its list of domains
  2. The site containing no domains. This site can be called the site default for this port
  3. The default site. The default site is used even it is assigned to another port. Thus the default site will handle all request from all ports if such requests contains no information about hosts or contains unrecognizable or unknown host names.

It follows from this that there are two places where your domain names should be stored. First it is the Megabrowser server so it can resolve the domain names’ to IP addresses. Second it is your Megabrowser so its WWW service can determine which host site is to be used to handle each request.




prev top next     index

Advertise with us - Knowledge Base - Support Forum - Site Map - Whois - Contact Us - Login - Live Support

© 1999 - 2004 MegaBrowser.com Peer-to-Peer Network - Become a MegaNode™ today. Patent Pending. All Rights Reserved.