Created
April 21, 2016 13:29
-
-
Save ernie/0d82f928feac4d76c07ed298dd25e601 to your computer and use it in GitHub Desktop.
Sample nginx config for a Venture (https://github.com/ernie/venture) server
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
server { | |
listen 80; | |
server_name venture.mydomain.com; | |
return 301 https://venture.mydomain.com$request_uri; | |
} | |
server { | |
listen 443 ssl; | |
server_name venture.mydomain.com; | |
root /var/www/mydomain.com/apps/venture/priv/static; | |
access_log /var/log/nginx/venture.mydomain.access.log; | |
ssl_certificate /etc/nginx/ssl/venture.mydomain.com.pem; | |
ssl_certificate_key /etc/nginx/ssl/venture.mydomain.com.key; | |
location / { | |
try_files $uri $uri/index.html @venture; | |
} | |
location @venture { | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
proxy_http_version 1.1; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
proxy_set_header Host $http_host; | |
proxy_redirect off; | |
proxy_pass http://localhost:3000; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment