Misc Links
Forum Archive
News Archive
File DB



Latest Forum Topics
wow 56 k modems are
Posted by Red Squirrel
on Oct 14 2013, 11:52:23 pm

I Need A Program
Posted by rovingcowboy
on Sep 23 2013, 5:37:59 pm

having trouble witn lan
Posted by rovingcowboy
on Sep 23 2013, 5:40:56 pm

new problem for me
Posted by rovingcowboy
on Sep 23 2013, 5:54:09 pm

RBC Royal Bank
Posted by Red Squirrel
on Aug 13 2013, 6:48:08 pm


How virtual web hosting works
Many domain sites on one IP
By Red Squirrel

I'm sure you probably know that domain names are simply IP addresses, but in a human readable format. When you type in a domain it must first be resolved to the IP address then the request sent to the server. But if the request sent to the server is by IP, how does the server know what domain is being requested? The answer lies in the depths of the http request. In the header, the domain is requested. Assume sitea and siteb are on the same server, you can actually connect to www.sitea.com but request www.siteb.com, and the server will give you www.siteb.com. Here is what a browser will send to a server:
GET /forums/ HTTP/1.1
Host: www.iceteks.com
There's usually more to it then that, but this is all that is required for a valid HTTP request, and you can try it for yourself in telnet. GET /forums shows that we want /forums of the host www.iceteks.com. It's the HOST: part that says that we want www.iceteks.com of the server that we sent the request to. So you can telnet www.iceteks.com 80 and send this request or telnet 80 and send this request and the server won't know the difference. It will serve www.iceteks.com's home page no matter what.

What about data physically stored?
Data is physically stored in separate folders for each virtual host, but this is seamless to the user as the server is setup to handle requests under www.iceteks.com to make that folder, the root folder. This is why you don't have to do anything silly like www.iceteks.com/iceteks/ to get to the actual data, since just saying www.iceteks.com tells the server to use /made/up/server/path/Iceteks/ as the root.

Before ending, we'll take a look at setting up a virtual host on an apache server, to test this you simply need to add the name in your host file and point to the IP of the server you do it on.

At the bottom of the http.conf file, put the following text. I don't think location matters much, but I usually put it at the bottom.

This creates a new "rental space" for a site with a domain [anything]Iceteks.loc where the root data is at /data/intranet/main/www/Iceteks and the log created for traffic on this site only would be located in /data/intranet/main/logs/Iceteks.log. The *:80 part is to tell what interface this applies to, in most servers it will stay that way.

There's more options, but this is simply to give you a brief configuration sample of a virtual host. In the future I may write a guide on how to setup a virtual host, so in that case more details would be provided on configuring ftp and email for virtual host environment, but I need to learn that myself. :) As far as I know, they work slightly different then HTTP, in the sense that they are user based so host's don't really matter. If user "iceteks" logs on to ftp, then that user is simply configured to use a certain folder. As far as email, it gets a bit more complicated, perhaps something to be covered in a future article.

I hope this article helped you get a better understanding of virtual hosting, and cleared things up on how it's made possible.

Red Squirrel
Iceteks Owner

25957 Hits Pages: [1] [2] 1 Comments

Latest comments (newest first)
Posted by Pyr-O-Rgasm on January 01th 2006 (21:00)
QUOTE (Everick @ Jan 26 2006, 08:56 PM)
The information was very useful in helping me to understand what Web Hosting is all about. This is all very new to me and I am not sure how to proceed or even if I am doing the right thing. Perhaps I should explain my situation.

I am an independent associate marketing legal expense plans. I currently have a Web Site hosted by the parent company (I think) of which I am a member and an indenpendent associate. I am afraid that my web site as it is currently set up, is not seen by anyone unless I personally give them the web address. I would like that if someone did a Google search for Legal Expense Plans that my site would have a fair shot at coming up on the search, or that my page may be linked from another web site. My question is, does Web Hosting solve my problem, or would I be paying for something that I don't really need.

Thank you

Email: evericka6@yahoo.com

If you're web site is hosted.... Then you have web hosting.

View all comments
Post comment

Top Articles Latest Articles
- What are .bin files for? (669062 reads)
- Text searching in linux with grep (161180 reads)
- Big Brother and Ndisuio.sys (150471 reads)
- PSP User's Guide (139547 reads)
- SPFDisk (Special Fdisk) Partition Manager (117240 reads)
- How to Use MDADM Linux Raid (188 reads)
- What is Cloud Computing? (1225 reads)
- Dynamic Forum Signatures (version 2) (8769 reads)
- Successfully Hacking your iPhone or iTouch (18714 reads)
- Ultima Online Newbie Guide (35906 reads)
corner image

This site best viewed in a W3C standard browser at 800*600 or higher
Site design by Red Squirrel | Contact
© Copyright 2020 Ryan Auclair/IceTeks, All rights reserved