Created
February 4, 2018 11:38
-
-
Save telingadigital/d0bfed655aa471e558e8987556333903 to your computer and use it in GitHub Desktop.
Nginx Server Block Configuration For Running NodeJS on Windows with SSL
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 443 ssl; | |
server_name node.dev www.node.dev; | |
# SSL Conf | |
ssl_certificate c:/nginx/ssl/node.dev.pem; | |
ssl_certificate_key c:/nginx/ssl/node.dev.key; | |
ssl_session_cache shared:SSL:1m; | |
ssl_session_timeout 5m; | |
ssl_ciphers HIGH:!aNULL:!MD5; | |
ssl_prefer_server_ciphers on; | |
location / { | |
proxy_pass http://localhost:8000; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection 'upgrade'; | |
proxy_set_header Host $host; | |
proxy_cache_bypass $http_upgrade; | |
} | |
error_page 500 502 503 504 /50x.html; | |
location = /50x.html { | |
root html; | |
} | |
location ~ /\.ht { | |
deny all; | |
} | |
} | |
server { | |
listen 80; | |
server_name node.dev www.node.dev; | |
return 301 https://$server_name$request_uri; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment