|
-
May 6th, 2008, 08:26 AM
#9
Time for a bit of WebServer 101
SirDice is 100% correct... so for those that don't understand.. here's how it works.
When you request a webpage (typing a domain name or IP in your browser's address bar)... A request is generated that looks similar to the following (we'll use antionline.com as our example).
Code:
GET / HTTP/1.1
HOST: antionline.com
Of course your browser puts plenty of other stuff in there, but that's basic enough to work.
Web Servers (with a few exceptions) can host multiple websites, configured by hostname, ip, etc. The most common (as in the case of purchased web hosting) is by hostname using Virtual Hosts. In this case the site has a default configured site, and then multiple virtual sites. Depending on the setup that default site could be a valid page or a standard server configuration page. Since your browser simply resolves the domain name you provide and connects to the IP Address that it resolves to, it needs a way to specify which virtual host it is looking for. The HOST: header allows this to happen. It is also a requirement in HTTP/1.1.
The concept that oofki / nihil suggested is flawed... here's an example:
74.208.75.235 -- Displays: It Works!
www.securitysentience.com -- Displays: It Works!
However that sites also hosts:
www.killthesun.org
www.numerophobe.com
Along with a couple of others.
Similar Threads
-
By Moira in forum General Programming Questions
Replies: 11
Last Post: July 17th, 2007, 08:34 AM
-
By neemitjamwal in forum Code Review
Replies: 6
Last Post: December 27th, 2003, 07:01 PM
-
By PuReExcTacy in forum Web Development
Replies: 2
Last Post: September 22nd, 2003, 05:02 AM
-
By CyberSpyder in forum AntiOnline's General Chit Chat
Replies: 0
Last Post: March 25th, 2003, 09:31 AM
-
By mountainman in forum Other Tutorials Forum
Replies: 2
Last Post: December 21st, 2001, 09:23 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|