Author: Keir Whitlock Date: To: Hampshire Subject: [Hampshire] VirutaHosts with Differnet Outbound IPs
Hi Guys,
I have a question that I have that is troubling me, and wondered if anyone
would be able to offer any suggestions etc. The problem maybe an easy fix or
it might be impossible I dont know.
Basically I have a server with an IP mounted on eth0 and another IP in the
same subnet on eth0:0.
I also have two IP based apache virtualhosts, one for each IP.
Within each vhost, there is a proxypass to the same offsite location.
What I need to happen is, if you hit vhost1 the offsite location sees it
come from the IP on eth0; and if you hit vhost2 the offsite location sees it
come from IP on eth0:0.
At present all the traffic appears to come form the primary IP which made
sense. And the requirement before was to go to two different offsite IPs, so
I was going to use iptables with a SNAT rule, which worked. But now the
requirement has changed to the same offsite IP, I'm thinking this may not be
possible.