Page 1 of 1

apache virtual host

Posted: Sun Dec 13, 2009 10:20 pm
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

Re: apache virtual host

Posted: Mon Dec 14, 2009 5:52 am
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.

Re: apache virtual host

Posted: Mon Dec 14, 2009 6:19 am
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

Re: apache virtual host

Posted: Mon Dec 14, 2009 7:19 am
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 ;)

Re: apache virtual host

Posted: Mon Dec 14, 2009 8:59 am
by Eran
globally as in from the Internet as opposed to a local network. That's what I got at least

Re: apache virtual host

Posted: Tue Dec 15, 2009 7:35 am
by VladSun
Frankly, it's very unclear what the OP wants :)