An open collection of noteworthy things

Code

Using HTTP/2 on nginx!

NGINX 1.9.5 was finally released a while ago – and it came with the new, speedy HTTP/2!

For those that’re living under a rock, here’s a long(er) explanation of HTTP/2. I’ll summarize for you; HTTP/2 is the new successor to HTTP/1.1 of ye olde, and is based on Google’s SPDY protocol. It’s binary rather than text-based, and can multiplex stuff. Pretty cool. In short, it’s faster. A lot faster.

So here’s how you use it:

NGINX

If you’re running Nginx version 1.9.5 or over, you just need to change

listen 443 ssl;

to

listen 443 ssl http2;

…and then reload your config:

sudo service nginx reload

Then your website should be served over HTTP/2, to clients that support it!

(HTTP/2 is currently only available over SSL/TLS connections in most browsers, so don’t bother trying it with plain old HTTP yet. You may as well get a free SSL cert from Let’s Encrypt now, as they’re in public beta. Yay!)