If I understand what you are after correctly, I am sure some minor mangling could do this. If you just want to duplicate all incoming webserver traffic, you could use iptables with the xtables tee to mirror your webserver's port(s) to another Apache server. If you only want to mirror certain requests, I think you could achieve this by having Apache listen on multiple ports, redirect calls using mod_rewrite or whatever to the other listening webserver:port. Have this redirection happening in conjunction with iptables/tee forwarding this other listening port out to your other Apache instance also.
Depending on your needs, I would think you would want to block the responses from the second Apache server. Chances are they would be dropped by the requesting host but the host would probably still receive them. So depending on how silent you needed to be, I suggest dropping all outbound responses using iptables or whatever. If neither of these solutions work, perhaps fronting your Apache server with Squid in a reverse proxy configuration. It has been years since I have played with it but I believe you can use Squid Redirector or something like SquidGuard to redirect all or specific requests out to multiple destinations. But all this could be overkill and probably a big pain, maybe just using something simple like Ruby Webrick httpproxy. Setup a listening service, forward/redirect and/or duplicating certain requests would probably work too. Have Webrick forward requests to your primary Apache but also to your other Apache instances. Good luck, Nick On Tue, Jul 12, 2011 at 5:05 PM, Robin Wood <[email protected]> wrote: > Does anyone know if there is a way to get Apache to send a request to > multiple servers, possibly using something like mod_proxy, and specify > which one I want to take the response from. > > I'm thinking of something like a replication system, take this request > and send it to the main server and also to a second and third server > as a backup. This isn't a replication service, I'm just using this as > an example. > > Robin > _______________________________________________ > Pauldotcom mailing list > [email protected] > http://mail.pauldotcom.com/cgi-bin/mailman/listinfo/pauldotcom > Main Web Site: http://pauldotcom.com > _______________________________________________ Pauldotcom mailing list [email protected] http://mail.pauldotcom.com/cgi-bin/mailman/listinfo/pauldotcom Main Web Site: http://pauldotcom.com
