Created
July 13, 2017 09:08
-
-
Save mauritslamers/cb472a0ffd43acbcee2a3066b35bf725 to your computer and use it in GitHub Desktop.
NGinx configuration for SocketCluster
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 my.domain.ext; | |
return 301 https://my.domain.ext$request_uri; | |
} | |
server { | |
listen 443 ssl; | |
server_name my.domain.ext; | |
index index.html index.htm; | |
root /root/to/some/path; # not actually used | |
ssl_certificate /etc/ssl/my/cert.crt; | |
ssl_certificate_key /etc/ssl/my/key.pem; | |
location / { | |
proxy_pass http://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