title: Configuring nginx to add a forward proxy?
body: <p>So I have an app that spins up a web service at <a href="http://localhost:4206" rel="nofollow">http://localhost:4206</a>.</p>
  
  <p>I have copied the app to an EC2 instance, and now want to start the service, but allow everyone (external consumers) to hit the service. I know that I can configure nginx to add a forward proxy from port 8080 (external) to my server's port (4206).</p>
  
  <p>I've found the following guide: <a href="https://ef.gy/using-nginx-as-a-proxy-server" rel="nofollow">https://ef.gy/using-nginx-as-a-proxy-server</a></p>
  
  <p>However, I'm unsure of what exactly on this guide I should be doing... </p>
  
  <p>What should this snippet look like for me?</p>
  
  <pre><code>server {
      listen       8080;
  
      location / {
          resolver 8.8.8.8;
          proxy_pass http://$http_host$uri$is_args$args;
      }
  
      error_page   500 502 503 504  /50x.html;
      location = /50x.html {
          root   html;
      }
  }
  </code></pre>
  
  <p>Some direction would be appreciated. Thanks!</p>