Skip to content

Instantly share code, notes, and snippets.

@gabamnml
Forked from octaflop/legionofevilssl.conf
Created July 19, 2013 19:37
Show Gist options
  • Save gabamnml/6041813 to your computer and use it in GitHub Desktop.
Save gabamnml/6041813 to your computer and use it in GitHub Desktop.
# The upstream server doesn't need a prefix! no need for wss:// or http:// because nginx will upgrade to http1.1 in the config below
upstream yeomanserver {
server localhost:3000;
}
server {
listen 443;
server_name legionofevil.org;
root html;
index index.html index.html;
access_log /var/log/nginx/access_443.log;
error_log /var/log/nginx/error_443.log;
ssl on;
ssl_certificate /srv/ssl/nginx.pem;
ssl_certificate_key /srv/ssl/nginx.key;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 5m;
location / {
proxy_pass http://yeomanserver;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
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 https;
proxy_redirect off;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment