LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-22-2011, 02:56 PM   #1
kris_rocks!
LQ Newbie
 
Registered: Jan 2010
Posts: 19

Rep: Reputation: 0
Unhappy How to apache identify for which virtual host the request has come?


Hi Guys!

I'm having some basic doubt! Consider 5 virtual domains has configured under a same server. I mean 5 different domains under same IP. Eg. mydomain1.com and mydomain2.com have IP 208.27.1.89. So when web browser request for mydomain1.com name server return IP address 208.27.1.89. Then browser contact IP 208.27.1.89 on port 80. Here comes my question how does apache know that the browser is looking for mydomain1.com not mydomain2.com. How apache differentiate the request for it's virtual hosts? By the way, what is a virtualhost ?
 
Old 01-22-2011, 03:17 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 614Reputation: 614Reputation: 614Reputation: 614Reputation: 614Reputation: 614
The HTTP 1.1 specification provides this.

http://www.w3.org/Protocols/rfc2616/....html#sec14.23

Code:
 For example, a request on the origin server for <http://www.w3.org/pub/WWW/> would properly include: 
       GET /pub/WWW/ HTTP/1.1
       Host: www.w3.org

A client MUST include a Host header field in all HTTP/1.1 request messages
http://en.wikipedia.org/wiki/Virtual_hosting
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Any way to tunnel apache virtual host to an internal apache? ciuly Linux - Server 5 01-31-2010 01:53 PM
apache virtual host help? paddyjoy Linux - Server 4 09-19-2006 06:49 AM
Apache 2 Virtual host eckertc1 Linux - Software 6 03-22-2005 10:58 PM
apache and virtual host diverge Linux - Networking 2 01-11-2004 03:45 AM
apache virtual host mimi Linux - General 1 04-06-2002 06:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration