From owner-freebsd-questions Wed Jan 2 6:15:23 2002 Delivered-To: freebsd-questions@freebsd.org Received: from dire.bris.ac.uk (dire.bris.ac.uk [137.222.10.60]) by hub.freebsd.org (Postfix) with ESMTP id A575C37B41A for ; Wed, 2 Jan 2002 06:15:20 -0800 (PST) Received: from mail.ilrt.bris.ac.uk by dire.bris.ac.uk with SMTP-PRIV with ESMTP; Wed, 2 Jan 2002 14:15:17 +0000 Received: from cmjg (helo=localhost) by mail.ilrt.bris.ac.uk with local-esmtp (Exim 3.16 #1) id 16Lm8W-0004ez-00; Wed, 02 Jan 2002 14:12:56 +0000 Date: Wed, 2 Jan 2002 14:12:56 +0000 (GMT) From: Jan Grant X-X-Sender: To: Donnie Jones Cc: freebsd-questions Subject: Re: Two domains, only one real IP address. In-Reply-To: <20020102080755.77ff04f4.donniejones18@yahoo.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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