There's probably an existing question (or guide somewhere on the web) about this, but I couldn't find it.
We want to slowly migrate our user base from one implementation of the back end server to a new implementation on different servers.
There's already an Apache2 reverse proxy in front of the back end server.
So we'd like to proxy some source IP ranges/subnets to the new server, leaving all others redirecting to the original server. Then add to the IP ranges that proxy to the new server until they all do. Then remove the old server.
Can someone give me some pointers to how this is done in Apache?
For me an approach would be something like this:
From the apache manual
You could do this using mod_rewrite for proxying. You will have to setup a rewrite condition based on the source IP and a rewrite rule with the [P] flag. Something like this should work:
Check http://httpd.apache.org/docs/2.2/rewrite/proxy.html for more information.