Skip to content

Instantly share code, notes, and snippets.

@mazhar266
Last active November 24, 2018 12:15
Show Gist options
  • Save mazhar266/f85a78e88ed63607b566e5a4ca0bc4c7 to your computer and use it in GitHub Desktop.
Save mazhar266/f85a78e88ed63607b566e5a4ca0bc4c7 to your computer and use it in GitHub Desktop.
HTTPS, HTTP2 & SPDY on NginX
server {
listen 80 default_server;
listen [::]:80 default_server;
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
ssl on;
ssl_certificate your-bundle.cert;
ssl_certificate_key your-key.key;
location / {
proxy_pass http://localhost:8000;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_redirect off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header X-Forwarded-Proto https;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment