Skip to content

Instantly share code, notes, and snippets.

@drefined
Forked from ryzy/vhost.conf
Created September 9, 2016 06:37
Show Gist options
  • Save drefined/d651cade29ffb8dc6b2ff94a5d60f663 to your computer and use it in GitHub Desktop.
Save drefined/d651cade29ffb8dc6b2ff94a5d60f663 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