Created
September 15, 2016 15:17
-
-
Save mauritslamers/c6afead761efe4c674956098a0adf2b1 to your computer and use it in GitHub Desktop.
socketcluster nginx config
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
map $http_upgrade $connection_upgrade { | |
default upgrade; | |
'' close; | |
} | |
server { | |
listen 80; | |
server_name server.example.com; | |
return 301 https://server.example.com$request_uri; | |
} | |
server { | |
listen 443 ssl; | |
server_name server.example.com; | |
index index.html index.htm; | |
ssl_certificate /etc/nginx/ssl/wildcard.crt; | |
ssl_certificate_key /etc/nginx/ssl/wildcard.key; | |
location / { | |
proxy_pass https://127.0.0.1:8000; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection $connection_upgrade; | |
proxy_set_header Host $host; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment