[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] Iptables/multiple web servers
- Subject: [ale] Iptables/multiple web servers
- From: cegolf at ugholf.net (Chris Egolf)
- Date: Fri Oct 3 14:15:16 2003
- In-reply-to: <[email protected]>
- References: <[email protected]>
nick travis wrote:
> I need to run 2 web servers located on different machines, I'm using an
> Iptables firewall script and in the past I only had one web server so I
> just redirected all port 80 traffic to the server, how can I set this up
> in Iptables to direct to a certain server based on the web request?
>
I'm guessing you only have one available 'real' IP address to work with,
right?
Two thoughts come to mind, but I'm sure there are other ways.
1) There's an 'experimental' plugin for iptables that can examine
packets for arbitrary text. I forget what it's called, and it may even
be part of the standard package now. I can't find my reference to it at
the moment. Sorry.
2) Use mod_rewrite to handle it. However, you'll have to change the
port when redirecting traffic to the 2nd server if you have only one IP.
Chris
--
============================================================================
Chris Egolf
http://www.ugholf.net cegolf[at]ugholf.net
============================================================================