Created
August 29, 2013 18:01
-
-
Save phstudy/6381331 to your computer and use it in GitHub Desktop.
nginx forward setting for Elastic Beanstalk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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