Date: Mon, 22 Mar 2004 19:48:20 +0000 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: "Eli K. Breen" <eli@gopostal.ca> Cc: freebsd-stable@freebsd.org Subject: Re: natd & virtual hosting Message-ID: <20040322194820.GA21648@happy-idiot-talk.infracaninophile.co.uk> In-Reply-To: <405F3B3E.6040404@gopostal.ca> References: <405F2344.4050309@gopostal.ca> <405F3657.7080005@bgp4.net> <405F3B3E.6040404@gopostal.ca>
next in thread | previous in thread | raw e-mail | index | archive | help
--/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: <VirtualHost *:80> ServerAdmin webmaster@example.com ServerName www8080.example.com DocumentRoot "/usr/local/www/www8080.example.com/" # Not sure if t= his # is necessary =20 <IfModule mod_proxy.c> ProxyPass / http://www8080.example.com:8080/ ProxyPassReverse / http://www8080.example.com:8080/ </IfModule> </VirtualHost> =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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040322194820.GA21648>