Created
December 4, 2014 12:51
-
-
Save killmenot/3cbaaa91f8e1e8ea5fe4 to your computer and use it in GitHub Desktop.
Nginx+node sample config
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; | |
server_name <host>; | |
ssl on; | |
ssl_session_timeout 5m; | |
ssl_prefer_server_ciphers on; | |
ssl_certificate /path/to/cert.pem; | |
ssl_certificate_key /path/to/cert.key; | |
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2; | |
ssl_ciphers C4:HIGH:!aNULL:!MD5; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_set_header X-NginX-Proxy true; | |
location / { | |
proxy_pass http://localhost:{port}; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment