From owner-freebsd-questions@FreeBSD.ORG Mon Nov 5 06:10:29 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CFF116A41B for ; Mon, 5 Nov 2007 06:10:29 +0000 (UTC) (envelope-from cpghost@cordula.ws) Received: from fw.farid-hajji.net (fw.farid-hajji.net [213.146.115.42]) by mx1.freebsd.org (Postfix) with ESMTP id 27C1313C481 for ; Mon, 5 Nov 2007 06:10:29 +0000 (UTC) (envelope-from cpghost@cordula.ws) Received: from epia-2.farid-hajji.net (epia-2 [192.168.254.11]) by fw.farid-hajji.net (Postfix) with ESMTP id 10228DFD59; Mon, 5 Nov 2007 07:09:54 +0100 (CET) Date: Mon, 5 Nov 2007 07:09:52 +0100 From: cpghost To: Norberto Meijome Message-ID: <20071105070952.50ba2f37@epia-2.farid-hajji.net> In-Reply-To: <20071105135017.76a2c48a@meijome.net> References: <20071105135017.76a2c48a@meijome.net> Organization: Cordula's Web X-Mailer: Claws Mail 3.0.2 (GTK+ 2.12.1; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Brian Finniff , freebsd-questions@freebsd.org Subject: Re: DNS and IP X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Nov 2007 06:10:29 -0000 On Mon, 5 Nov 2007 13:50:17 +1100 Norberto Meijome wrote: > On Sun, 4 Nov 2007 18:00:27 -0500 > Brian Finniff 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/