Nicholas Lindley

Since I have moved off of CDN hosting and onto a VPS and have more control over the tech stack, I decided to go ahead and set up HTTP/2. It only took a few minutes including research and implementation.

I was already running NGINX on Debian with TLS enabled. NGINX’s stable branch currently has version 1.8, and we need 1.9, so we have to change our apt sources from

deb http://nginx.org/packages/debian/ jessie nginx
deb-src http://nginx.org/packages/debian/ jessie nginx

to

deb http://nginx.org/packages/mainline/debian/ jessie nginx
deb-src http://nginx.org/packages/mainline/debian/ jessie nginx

Next we look for any TLS listeners—I’m not bothering with non-TLS since it just redirects to the secure version—and add http2. Here is a truncated example that leaves out things like certificate and file location configurations.

server {
    listen       443 ssl http2;
    server_name  www.thisoneplace.com;
}

Restart the server and you’re done. (Reloading might also work, but I restarted so I can’t say for sure.)