apache virtual host

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
dsick
Forum Commoner
Posts: 57
Joined: Fri Mar 27, 2009 3:34 pm

apache virtual host

Post by dsick »

i use xampp and im trying to set up a domain through apache

is it possible to set up a domain that can be viewed globally? i seen guides on it so i figured if theres support for it that i can do it... but the guides are so complicating... im going to try to get help here before i break down there guide and spend the day figuring it out :P
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: apache virtual host

Post by VladSun »

Domain names are "setup" by using Domain Name Servers (DNS), not by using Apache virtual hosts.
Let's have a user trying to open domain.com web site (that is trying to connect to port 80) by typing into his/her browser: http://www.domain.com

1) A request to the user's DNS is sent "What's the IP of http://www.domain.com"
2) If it's a valid domain the DNS answers with "The IP of domain.com is 1.2.3.4"
3) The user's browser sends a GET request to IP 1.2.3.4, the HOST header of the GET request is set to http://www.domain.com
4) The web server (Apache) receives the request, parse the HOST header and forward (internally) the user's request to the corresponding virtual host.
5) The virtual host www "subserver" processes the user's GET request.
There are 10 types of people in this world, those who understand binary and those who don't
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: apache virtual host

Post by Eran »

I think he referring to the local mapping of domain/subdomain to a specific document root. That is indeed handled by a virtualhost directive
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: apache virtual host

Post by VladSun »

pytrin wrote:I think he referring to the local mapping of domain/subdomain to a specific document root. That is indeed handled by a virtualhost directive
dsick wrote:is it possible to set up a domain that can be viewed globally?
The "globally" world makes me think otherwise ;)
There are 10 types of people in this world, those who understand binary and those who don't
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: apache virtual host

Post by Eran »

globally as in from the Internet as opposed to a local network. That's what I got at least
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: apache virtual host

Post by VladSun »

Frankly, it's very unclear what the OP wants :)
There are 10 types of people in this world, those who understand binary and those who don't
Post Reply