Skip to content

Instantly share code, notes, and snippets.

@phstudy
Created August 29, 2013 18:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phstudy/6381331 to your computer and use it in GitHub Desktop.
Save phstudy/6381331 to your computer and use it in GitHub Desktop.
nginx forward setting for Elastic Beanstalk
files:
"/etc/nginx/conf.d/custom.conf" :
content: |
server {
listen 8080;
server_name foo.chief-motp.com;
location / {
proxy_pass http://nodejs/foo/;
proxy_set_header Connection "";
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /public {
alias /var/app/current/public;
}
}
server {
listen 8080;
server_name bar.chief-motp.com;
location / {
proxy_pass http://nodejs/bar/;
proxy_set_header Connection "";
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /public {
alias /var/app/current/public;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment