From owner-freebsd-stable@FreeBSD.ORG Tue Mar 23 16:10:33 2004 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B74FA16A4CE for ; Tue, 23 Mar 2004 16:10:33 -0800 (PST) Received: from murdock.sectornotfound.com (unknown [24.84.228.253]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1093343D2D for ; Tue, 23 Mar 2004 16:10:33 -0800 (PST) (envelope-from eli@gopostal.ca) Received: from gopostal.ca (localhost [127.0.0.1])i2O0AFae092916; Tue, 23 Mar 2004 16:10:17 -0800 (PST) (envelope-from eli@gopostal.ca) Message-ID: <4060D258.8010601@gopostal.ca> Date: Tue, 23 Mar 2004 16:12:08 -0800 From: "Eli K. Breen" User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5) Gecko/20031208 Thunderbird/0.3 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Matthew Seaman References: <405F2344.4050309@gopostal.ca> <405F3657.7080005@bgp4.net> <405F3B3E.6040404@gopostal.ca> <20040322194820.GA21648@happy-idiot-talk.infracaninophile.co.uk> In-Reply-To: <20040322194820.GA21648@happy-idiot-talk.infracaninophile.co.uk> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: Janet Sullivan cc: freebsd-stable@freebsd.org Subject: Re: natd & virtual hosting X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Mar 2004 00:10:33 -0000 Just to wrap up this thread (although it has left the realm of FreeBSD-specific) This worked perfectly! (Apache2 only) *Note that the redirections can be to internal-only addresses providing you leave ProxyRequests off. Adding an internal alias to the BSD box and binding the alternate httpd to that IP then using that IP as the Proxy destination worked flawlessly. Also need to add the following to httpd.conf LoadModule proxy_module libexec/apache2/mod_proxy.so #Not sure if you need both of the following... LoadModule proxy_connect_module libexec/apache2/mod_proxy_connect.so LoadModule proxy_http_module libexec/apache2/mod_proxy_http.so ProxyRequests Off Order deny,allow Allow from all Cheers, -E- Matthew Seaman wrote: > On Mon, Mar 22, 2004 at 11:15:10AM -0800, Eli K. Breen wrote: >>>>I'm trying to host a few services under a few different domain names and >>>>need to be running multiple webservers to do it (apache 1.3x and 2.x). >>>> >>>>If I have a single IP, will nat with FreeBSD 4.9 allow me to separate >>>>requests by domain name even if they share an IP? > A good trick is to set up all of the virtual hosts you need in the > server listening on port 80 (presumably this is your apache-1.3.x > server), and then use mod_proxy to fetch the content from the server > on port 8080 (presumably the apache-2.0.x server). Something like: > > > ServerAdmin webmaster@example.com > ServerName www8080.example.com > DocumentRoot "/usr/local/www/www8080.example.com/" # Not sure if this > # is necessary > > > ProxyPass / http://www8080.example.com:8080/ > ProxyPassReverse / http://www8080.example.com:8080/ > >