Reverse and Forward proxy?


Can nginx run as a forward and revers proxy in the same host?

I am looking for a solution to the below

  1. Forward Proxy

App Server > Proxy Server > Internet > Source IP

My App server will need to use a Proxy to fetch files over the internet
would usually use Squid for this)

  1. Reverse Proxy

Source IP > Internet > Proxy Server > App Server

Source IP needs to reach my Proxy server which forwards requests on port
to my App Server. The App server is listening and then responds.

Can can both 1) and 2) above be managed by one nginx instance? I could
Squid for 1) and nginx for 2). But I would like to use nginx for both on
same server. Let me know if you need further info.

Thanks guys,

Posted at Nginx Forum: