From owner-freebsd-stable@FreeBSD.ORG Mon Mar 22 11:48:49 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 D9F6116A4CE for ; Mon, 22 Mar 2004 11:48:49 -0800 (PST) Received: from smtp.infracaninophile.co.uk (happy-idiot-talk.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B57543D31 for ; Mon, 22 Mar 2004 11:48:48 -0800 (PST) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost.infracaninophile.co.uk [IPv6:::1])i2MJmKOv021784 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 22 Mar 2004 19:48:20 GMT (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)id i2MJmKG1021783; Mon, 22 Mar 2004 19:48:20 GMT (envelope-from matthew) Date: Mon, 22 Mar 2004 19:48:20 +0000 From: Matthew Seaman To: "Eli K. Breen" Message-ID: <20040322194820.GA21648@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: "Eli K. Breen" , Janet Sullivan , freebsd-stable@freebsd.org References: <405F2344.4050309@gopostal.ca> <405F3657.7080005@bgp4.net> <405F3B3E.6040404@gopostal.ca> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/9DWx/yDrRhgMJTb" Content-Disposition: inline In-Reply-To: <405F3B3E.6040404@gopostal.ca> User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on happy-idiot-talk.infracaninophile.co.uk X-Virus-Scanned: clamd / ClamAV version devel-20040316, clamav-milter version 0.67l 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: Mon, 22 Mar 2004 19:48:50 -0000 --/9DWx/yDrRhgMJTb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 22, 2004 at 11:15:10AM -0800, Eli K. Breen wrote: >=20 > Janet Sullivan 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? > > > >NAT works with IP addresses. Why can't you just use Virtual Hosts in=20 > >Apache? Do you really need to run both versions? =20 >=20 > Yes. Unfortunately. (Slash does not run on 2.x, many of the sites=20 > require 2.x) >=20 > I am already running virtual hosts on apache, there are many more than=20 > two sites, I've just simplified it for the sake of clarity. >=20 > >If so, what you need=20 > >to do is something like this: > > > >Apache 1.3x runs on port 80 > >Apache 2.x runs on port 8080 > > > > redirect 192.168.5.1:80 to 123.123.123.123:80 > > redirect 192.168.5.2:80 to 123.123.123.123:8080 > > >=20 > Also not an option, have tried this before, all manner of people run in= =20 > to access problems. Giving out your website as www.foo.com:8080 is just= =20 > weak. (redirects from a :80 fare no better due to the access problems). >=20 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 t= his # is necessary =20 ProxyPass / http://www8080.example.com:8080/ ProxyPassReverse / http://www8080.example.com:8080/ =20 Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --/9DWx/yDrRhgMJTb Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAX0MEdtESqEQa7a0RAiBbAJ0YC2y9z4p1ShPp6JTZCClBQSG2iACfViD/ 5PnvD9jhCxo+SPM+T9TN3FI= =f+Qi -----END PGP SIGNATURE----- --/9DWx/yDrRhgMJTb--