Good way to reverse proxy through a forward proxy

Solution 1:

If your forward proxy server supports transparent proxying, you can just use iptables to redirect HTTP traffic transparently to your forward proxy.

Otherwise, you need to install a proxy server as you described and configure your application to use it as if it is the real server.

Solution 2:

Squid-cache should be able to do this. Look at the "never-direct" settings for configuring it so requests go through a parent instead of directly out. Also check out Apache Traffic Server. It claims to do just about anything! I think the config file is icp.config.