HTTP/2 on nginx on Debian
I run my web site off a Debian server on GCE. I like tinkering with the configuration. I hear that HTTP 2 is the new hot thing, and that’s going to mean supporting ALPN which means upgrading to OpenSSL 1.0.2 and nginx 1.9.5 or newer. But they isn’t supported in Debian 8.
deb http://ftp.us.debian.org/debian testing main non-free contrib
Then I configured my pin priorities by creating /etc/apt/preferences with:
Pin: release a=stable
Pin: release a=testing
Pin: release a=unstable
After an apt-get update I could install the version of nginx from testing, bringing in the appropriate version of OpenSSL: apt-get -t=testing install nginx-full
Then it was just a matter of changing:
listen 443 ssl;
listen 443 ssl http2;
wherever I wanted it.
Now it looks like I’m serving over HTTP/2. Not that it makes a whole lot of obvious difference yet.
Originally published at Ian McKellar.