title: Creating proxy_pass from cloudfront to ec2 instanse
body: <p>I'm want to create move our front end setup on CloudFront and s3. </p>
  
  <p>I got an application with a static web site with an nginx that proxy_pass the host header to another port on the same machine (as seen in the code below). </p>
  
  <pre><code>location /api {
          proxy_pass http://my_app:8080;
          proxy_set_header Host $host;
          proxy_set_header X-Real-IP $remote_addr;
          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
    client_max_body_size 1000M;
    server_tokens off;
  </code></pre>
  
  <p>After I uploaded my frontend to s3 and configured CloudFront origin to go to the s3 static web server how do I configure the Origin Settings &amp; Cache Behavior Settings to send the header to the ec2 instance as shown in the current Nginx config?</p>