Switch to HTTP/2 in Nginx on Debian Wheezy

Since Nginx 1.9.5, spdy module replaced by http2.

I am using Nginx 1.8 with Debian Wheezy, it's pretty easy to upgrade Nginx to 1.9+. Follow the step:

  • add following lines into /etc/apt/sources.list.d/nginx.list
deb http://nginx.org/packages/mainline/debian/ wheezy nginx
deb-src http://nginx.org/packages/mainline/debian/ wheezy nginx
  • Upgrade Nginx apt-get upgrade
  • Replace spdy with http2 in listen section in config files. The line looks like:
listen               443 ssl http2;
  • Restart nginx /etc/init.d/nginx restart

Please use HTTP/2 and SPDY Indicator check it works well. When you see a blue thunder icon appear in right of address bar, all thing works fine now.