Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Jan 2002 15:01:31 -0800 (PST)
From:      Ken Bolingbroke <hacker@bolingbroke.com>
To:        Donnie Jones <donniejones18@yahoo.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Two domains, only one real IP address.
Message-ID:  <20020102145233.R66447-100000@fremont.bolingbroke.com>
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.

You can't rule out "Virtual Hosts" on the gateway computer.  At the TCP/IP
level, there is no indication as to which web server the incoming request
is for.  It has to connect to an actual web server or web proxy before
that information comes out.

Think of it as wrapping a present for your nephew Bob, and putting it into
a box addressed to your brother John.  The mailman has no idea who the
present inside is for, indeed, the mailman doesn't even know it's a
present inside--he's just got a brown box addressed to John.

TCP is like the mailman--it's just got a package addressed to a specific
IP address and port, and it has no idea what's inside the package.  So you
need a daemon on the gateway that speaks HTTP and knows about virtual
hosts, and after opening the package and finding that the "present" is for
one of your inside web servers, it then proxies the connection over to
the right place.

That said, I don't know of any specific proxies oriented towards this kind
of work, but if nothing else, Apache or Squid should be hackable to do it.

Ken Bolingbroke
hacker@bolingbroke.com


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?20020102145233.R66447-100000>