title: How to use NGINX as forward proxy for any requested location?
body: <p>I am trying to configure NGINX as a forward proxy to replace Fiddler which we are using as a forward proxy. The feature of Fiddler that we use allows us to proxy ALL incoming request to a 8888 port. How do I do that with NGINX?</p>
  
  <p>In all examples of NGINX as a reverse proxy I see <code>proxy_pass</code> always defined to  a specific upstream/proxied server. How can I configure it so it goes to the requested server, regardless of the server in the same way I am using Fiddler as a forward proxy.</p>
  
  <p>Example:</p>
  
  <p>In my code:</p>
  
  <pre><code>WebProxy proxyObject = new WebProxy("http://mynginxproxyserver:8888/",true);
  WebRequest req = WebRequest.Create("http://www.contoso.com");
  req.Proxy = proxyObject;
  </code></pre>
  
  <p>In mynginxproxyserver/nginx.conf I do not want to delegate the proxying to another server (e.g. proxy_pass set to <code>http://someotherproxyserver</code>). Instead I want it to just be a proxy server, and redirect requests from my client (see above) to the request host. That's what Fiddler does when you enable it as a proxy: <a href="http://docs.telerik.com/fiddler/Configure-Fiddler/Tasks/UseFiddlerAsReverseProxy" rel="noreferrer">http://docs.telerik.com/fiddler/Configure-Fiddler/Tasks/UseFiddlerAsReverseProxy</a></p>