Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Jan 2002 14:12:56 +0000 (GMT)
From:      Jan Grant <Jan.Grant@bristol.ac.uk>
To:        Donnie Jones <donniejones18@yahoo.com>
Cc:        freebsd-questions <freebsd-questions@freebsd.org>
Subject:   Re: Two domains, only one real IP address.
Message-ID:  <Pine.GSO.4.31.0201021408210.9788-100000@mail.ilrt.bris.ac.uk>
In-Reply-To: <20020102080755.77ff04f4.donniejones18@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 2 Jan 2002, Donnie Jones wrote:

> I have two domains and two httpd servers on my internal LAN.  My
> network is set up where I have the real IP address going to the
> FBSD-4.4 gateway then to an ethernet switch, and onto the two
> separate httpd servers (the httpd servers IP's are 192.168.0.10 and
> 192.168.0.11).
>
> I would like for my FBSD gateway to redirect, route, or somehow send
> the httpd requests from each domain to their respective httpd server
> on the internal LAN.  Also, I wouild prefer to not have to run
> apache on the FBSD gateway, so I think that may rule out "Virtual
> Hosts" on the gateway computer.
>
> I am unsure how to get the FBSD gateway to filter the httpd requests
> from the two separate domains to be sent to the individual httpd
> servers on the internal LAN?

Don't be so quick to rule out virtual hosting; that's an HTTP thing, not
a purely apache-based one. Install a lightweight web proxy that
understands this on the gateway and proxy the contents from each of the
internal servers.

Apache's as good a choice for this as any other (unless you have a huge
amount of traffic expected).

The problem with doing this at layer 3 (ie, with IPFW) is that
name-based virtual hosting relies on the Host: HTTP request header;
there's no guarantee that this will be sent in the same packet as the
start of the web request. Thus, you'd have to defer all
packet-forwarding until you know where the traffic is supposed to go
(which will require you to ACK it in that case, anyway).


-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 RFC822 jan.grant@bris.ac.uk
stty intr ^m


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.31.0201021408210.9788-100000>