From owner-freebsd-questions@FreeBSD.ORG Fri Feb 11 01:55:02 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0CCF116A4CE for ; Fri, 11 Feb 2005 01:55:02 +0000 (GMT) Received: from mail22.sea5.speakeasy.net (mail22.sea5.speakeasy.net [69.17.117.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id C898543D1F for ; Fri, 11 Feb 2005 01:55:01 +0000 (GMT) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: (qmail 1106 invoked from network); 11 Feb 2005 01:55:01 -0000 Received: from dsl092-078-145.bos1.dsl.speakeasy.net (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail22.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 11 Feb 2005 01:55:01 -0000 Received: by be-well.ilk.org (Postfix, from userid 1147) id 1469882; Thu, 10 Feb 2005 20:55:00 -0500 (EST) Sender: lowell@be-well.ilk.org To: Ken Hawkins References: <094c6888335eff7ca415bc1c475e42bb@rosewoodblues.com> <448y5x36jq.fsf@be-well.ilk.org> From: Lowell Gilbert Date: 10 Feb 2005 20:54:59 -0500 In-Reply-To: Message-ID: <44psz7j1xo.fsf@be-well.ilk.org> Lines: 50 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: freebsd-questions@freebsd.org Subject: Re: single box handling multiple ips, how? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: freebsd-questions@freebsd.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Feb 2005 01:55:02 -0000 Ken Hawkins writes: > I do not know what the 'web1.a.net.' is about, more specifically he > .net"." (dot on the end). i took this for the initial setup that was > done on the box' initial entry in the /etc/hosts. It looks like a DNS map, but that's not what should go in hosts(5). > ok what am i doing... > > I have apache running on the box and would like to use 3 diffferent > IP's to try and keep (somewhat separate) the traffic, logging, > etc. for the Virtual Hosts that are running there. > > ultimately I will have; > > resolve to -> website 1 > resolve to -> website 2 > resolve to -> website 3 > > obviously they will bind to the same box but i would like to have them > to separate ip's to ease some maintenance on the box, redirect traffic > when needed, blah, blah. > > I know that I can Name more than one VirtualHost ie; > NameVirtualHost ???.???.???.151:80 > NameVirtualHost ???.???.???.152:80 > NameVirtualHost ???.???.???.153:80 > > and then the normal VirtualHost directive via IP's but I want to make > sure that the box will answer to those ip's when we flip the DNS > switch. > > am i making sense? did i leave anything beyond the bind directive's out? Sure, it makes sense, but you're making it more complicated than you need to. At the very least, you're making the description more complicated than you need to. Don't worry about virtual hosts on Apache until you have the DNS configured for the addresses. And don't worry about the DNS until you have all of the IP addresses configured on the relevant interface. So the first step will be configuring the interface. Verify this by pinging each of the addresses from outside. The next step will be configuring the DNS, which you can test by pinging the distinct DNS name for each address in turn. Then once that is working, you can configure Apache to handle IP-based virtual hosts for each address. Good luck.