Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Nov 2007 07:09:52 +0100
From:      cpghost <cpghost@cordula.ws>
To:        Norberto Meijome <freebsd@meijome.net>
Cc:        Brian Finniff <tranceddancer@hotmail.com>, freebsd-questions@freebsd.org
Subject:   Re: DNS and IP
Message-ID:  <20071105070952.50ba2f37@epia-2.farid-hajji.net>
In-Reply-To: <20071105135017.76a2c48a@meijome.net>
References:  <BAY114-W1198B68AE765DD630D744BBB8F0@phx.gbl> <20071105135017.76a2c48a@meijome.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 5 Nov 2007 13:50:17 +1100
Norberto Meijome <freebsd@meijome.net> wrote:

> On Sun, 4 Nov 2007 18:00:27 -0500
> Brian Finniff <tranceddancer@hotmail.com> wrote:
> 
> > My question is, if you are running a website for 2 different people
> > on the Internet and they both wanted to acquire a domain but you
> > only have one IP address, would it be possible to forward each
> > domain to the same IP address and somehow each one becomes
> > distinct? If so, how is this possible? Can you explain to me how it
> > can be done.
> > 
> > Oh and for reference, I am not talking about web redirects.
> 
> Hi Brian,
> to be more generic in the answer, you can map as many FQDN (fully
> qualified domain name) as you want to a single IP via DNS (you can
> even enable wildcard records in certain DNS server software that will
> match *.yourdomain.com to a default IP). 
> 
> That tells {client_software} that {this_FQDN} is {this_IP}.
> {client_software}will use that information in whatever form is
> suitable to {client_software} - in most cases it will contact
> {server_sofware} running in a server (or group of servers) running as
> {this_IP}. It is up to {server_software} to determine how the request
> from {client_software} is handled. 

To be even more specific: the domain name of the recipient is
specified at ISO-OSI level 7 in the HTTP protocol with a Host:
header like this:

Host: www.example.com

This header, alongside other HTTP headers is received on port 80
of your web server, and it's up to your web server to route that
to the right virtual domain by serving the correct files...

By the way, if you're using Lighty (lighttpd), you can host
virtual domains as well:

http://trac.lighttpd.net/trac/wiki/Docs:ModSimpleVhost

-cpghost.

-- 
Cordula's Web. http://www.cordula.ws/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071105070952.50ba2f37>