LinuxQuestions.org
Visit Jeremy's Blog.
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, 01: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, 02:17 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
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 12:53 PM
apache virtual host help? paddyjoy Linux - Server 4 09-19-2006 05:49 AM
Apache 2 Virtual host eckertc1 Linux - Software 6 03-22-2005 09:58 PM
apache and virtual host diverge Linux - Networking 2 01-11-2004 02:45 AM
apache virtual host mimi Linux - General 1 04-06-2002 05:11 AM

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

All times are GMT -5. The time now is 08:55 AM.

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
Open Source Consulting | Domain Registration