Finding an HTTP proxy that will intercept static resource requests

Posted by pkh on Stack Overflow See other posts from Stack Overflow or by pkh
Published on 2010-05-13T00:48:33Z Indexed on 2010/05/13 0:54 UTC
Read the original article Hit count: 275

Filed under:
|
|

Background

I develop a web application that lives on an embedded device. In order to make dev times sane, frontend development is done using apache serving static documents, with PHP proxying out to the embedded device for specifically configured dynamic resources. This requires that we keep various server-simulation scripts hanging around in source control, and it requires updating those scripts whenever we add a new dynamic resource.

Problem

I'd like to invert the logic: if the requested document is available in the static documents directory, serve it; otherwise, proxy the request to the embedded device.

Optimally, I want a software package that will do this for me (for Windows or buildable on cygwin). I can deal with forcing apache to do it with PHP, but I'm unsure how to configure it to make it happen. I've looked at squid and privoxy, but neither of them seem to do what I want.

Any ideas? I'd rather not have to roll my own.

© Stack Overflow or respective owner

Related posts about http-proxy

Related posts about http