Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Mar 2004 11:02:06 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Torfinn Ingolfsen <torfinn.ingolfsen@broadpark.no>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: natd & virtual hosting
Message-ID:  <20040324110206.GB9845@happy-idiot-talk.infracaninophile.co.uk>
In-Reply-To: <20040324014243.75839158.torfinn.ingolfsen@broadpark.no>
References:  <405F2344.4050309@gopostal.ca> <405F3657.7080005@bgp4.net> <405F3B3E.6040404@gopostal.ca> <20040322194820.GA21648@happy-idiot-talk.infracaninophile.co.uk> <4060D258.8010601@gopostal.ca> <20040324014243.75839158.torfinn.ingolfsen@broadpark.no>

next in thread | previous in thread | raw e-mail | index | archive | help

--xXmbgvnjoT4axfJE
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Mar 24, 2004 at 01:42:43AM +0100, Torfinn Ingolfsen wrote:
> On Tue, 23 Mar 2004 16:12:08 -0800
> "Eli K. Breen" <eli@gopostal.ca> wrote:
>=20
> > Just to wrap up this thread (although it has left the realm of=20
> > FreeBSD-specific)
> >=20
> > This worked perfectly! (Apache2 only)
> [.. lots of info about the Proxy module snipped...]
>=20
> I don't know if this is 1.3 specific, but I use this solution with
> Apache 1.3.x:
> <VirtualHost *>
>     ServerName somename.domain.example
>     RewriteEngine on
>     RewriteRule ^/$     http://server/     [P]
> </VirtualHost>
>=20
> where 'server' is a dns-resolvable name (or ip address).
> In another, the RewriteRule line looks like this:
>     rewriteRule (.*)    http://192.168.1.1/$1  [P]
> at the moment, I can't remember why this one is different.
>=20
> Also, I can't remember where I first found this mentioned (except that
> it is documented at the Apache web site).

Yes -- that would work too.  TIMTOWTDI. However, with mod_rewrite
you've got to be careful with those [P] flags on the rewrite rules, or
you'll just end up issuing a 302 redirect -- and that wouldn't work
for the problem the OP had.

In fact, mod_rewrite [P] rules are handed off to mod_proxy to deal
with: mixing up mod_rewrite and mod_proxy in this way gives you a lot
more control over what URLs you select for this sort of proxy
remapping, but it's probably overkill for simply remapping whole
virtual hosts onto a different server.

	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

--xXmbgvnjoT4axfJE
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFAYWqudtESqEQa7a0RApvaAJ4joQitr+bn49JLvwbPh5PyaOPgGQCeOoVP
Kj+WCMcQYQfdj/EwygStBic=
=aVML
-----END PGP SIGNATURE-----

--xXmbgvnjoT4axfJE--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040324110206.GB9845>