[Novalug] Point multiple IPs to one server?
leapfrog at freeshell.org
Thu Jan 3 14:00:58 EST 2008
On Thu, 3 Jan 2008, Joel Fouse wrote:
> Hmm...a follow-up question on this. What about when the box is actually
> on a vlan, and currently it only "knows" (at the OS level) of an
> internal IP address (192.168-type) but it receives traffic from a public
> routable IP? For the time being (pre-multiple-IPS) it works fine,
> because Apache is just configured to listen to any port 80 traffic. How
> does the multiple public IP thing work out in this scenario, through to
> the Apache configs?
Then you have to use name-based virtual hosting. It doesn't matter which
IP the request comes in on, they all get routed to the internal
192.168.x.y address. What distinguises each request will be a Host: header
sent by the user agent. Apache will use that header to decide which
virtual host will handle the request.
# The first defined virtual host is the default virtual host
# any request that doesn't have a Host: header or a configured
# virtual host to handle it will land here
ServerAlias shop.site1.cop download.site1.cop
"I am not available for comment"
More information about the Novalug