Skip to content

Instantly share code, notes, and snippets.

@ryzy
Created March 12, 2016 23:54
Show Gist options
  • Save ryzy/80f60db68a63fbbba39c to your computer and use it in GitHub Desktop.
Save ryzy/80f60db68a63fbbba39c to your computer and use it in GitHub Desktop.
Nginx with HTTP/2 support (and behind HAProxy with HTTP/2)
server {
listen 80 default_server;
listen 81 default_server http2 proxy_protocol; ## Needed when behind HAProxy with SSL termination + HTTP/2 support
listen 443 default_server ssl http2;
ssl_certificate /etc/ssl/dummy.crt;
ssl_certificate_key /etc/ssl/dummy.key;
root /data/www/default;
index index.html;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment