I have many virtual hosts whose domain names map to a single Apache server (let's call it server1). Under certain circumstances, all URLs for a certain virtual host should be served by a different server instead (let's call it server2).
What's the easiest way to accomplish that? Can I simply set server2 to use the same name-based virtual host setup as server1, and then rely on server1's X-Forwarded-Host headers (i.e. will server2 do the right thing based on just those header's)? By "same name-based virtual host setup" I mean the "real" domain names (i.e. the domain names which map to server1's IP).