Multiplexing IPs For Apache
- From: Tim Daneliuk <tundra@xxxxxxxxxxxxxx>
- Date: 30 Mar 2006 21:34:17 EST
Imagine a dual-homed host. 1 NIC faces the public internet and is
assigned a routeable address. The other NIC connects the machine to
an internal network of private (nonroutable) IPs. The box is used as
a NATing gateway for the machines on the internal network. For the
sake of argument, let's say the machine has these assignments:
public.bar.com 64.3.192.18
private.bar.com 192.168.0.100
Now, imagine that one of the machines on the private network is running
Apache virtual servers. Let's say it looks like this:
foo.bar.com 192.168.0.1
baz.bar.com 192.168.0.2
nuz.bar.com 192.168.0.3
The .1 address is the primary one for that machine's NIC. The .2 and .3
are aliases associated with this same NIC. This is done so that
Apache running on that machine can provide independent SSL certificates
for each virtual host.
Now, supposed the bar.com DNS entries visible to the public internet
pointed foo, baz, and nuz to public.bar.com. Here is the million dollar
question: Is there some magical way that to write an ipfw firewall rule
or even a NATing redirect that is based on *the http header* rather than
the IP address? IOW, is there a way to examine all traffic coming in on
64.3.192.18:80 and multiplex it across the internal foo, bar, nuz
machines as requested in the http envelope?
The idea, of course, is to minimize the number of publicly consumed
routeable IPs while still hosting many virtual hosts *inside* the
private network. I'm guessing that there is some way to do this because
web hosting ISPs do not consume an IP per virtual host (do they?).
P.S. I am aware that you can do Apache virtual hosting distinguished
by *name* running on a single IP. The problem with this is that each
Apache virtual host cannot have a unique SSL certificate for its
https portions so this is a nonstarter in my universe.
TIA,
--
----------------------------------------------------------------------------
Tim Daneliuk tundra@xxxxxxxxxxxxxx
PGP Key: http://www.tundraware.com/PGP/
.
- Prev by Date: third ide disk?
- Next by Date: Re: ftp drop box
- Previous by thread: third ide disk?
- Next by thread: sar
- Index(es):
Relevant Pages
|