Last active
November 24, 2018 12:15
-
-
Save mazhar266/f85a78e88ed63607b566e5a4ca0bc4c7 to your computer and use it in GitHub Desktop.
HTTPS, HTTP2 & SPDY on NginX
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 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