Created
April 15, 2015 03:39
-
-
Save absyah/b9566bff217e72d5fb2f to your computer and use it in GitHub Desktop.
This file contains 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
upstream app { | |
# Path to Unicorn SOCK file, as defined previously | |
server unix:/tmp/unicorn.livepass.sock fail_timeout=0; | |
} | |
server { | |
listen 80; | |
# Application root, as defined previously | |
# root /home/ubuntu/livepass/current/public; | |
# ssl on; | |
# ssl_certificate /etc/nginx/ssl/SSL.crt; | |
# ssl_certificate_key /etc/nginx/ssl/YOUR_APP_NAME.key; | |
# server_name www.YOUR_APP_NAME.com YOUR_APP_NAME.com; | |
try_files $uri/index.html $uri @app; | |
access_log /var/log/nginx/livepass_access.log combined; | |
error_log /var/log/nginx/livepass_error.log; | |
location /api/ { | |
root /home/ubuntu/livepass/current/public; | |
proxy_set_header X-Forwarded-For $remote_addr; | |
proxy_set_header Host $http_host; | |
proxy_redirect off; | |
proxy_pass http://app/api; | |
proxy_set_header X-Forwarded-Proto https; # <-- don't need this if you're not running SSL | |
} | |
location / { | |
root /home/ubuntu/livepass-web-front-end/app; | |
index index.html; | |
} | |
error_page 500 502 503 504 /500.html; | |
client_max_body_size 4G; | |
keepalive_timeout 10; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment