Nginx with HTTP2

Check your nginx version and you need 1.9.5+, for upgrading on Ubuntu do someting like this

sudo apt-get purge nginx nginx-common

Add nginx source to source.list

deb http://nginx.org/packages/mainline/ubuntu/ trusty nginx
deb-src http://nginx.org/packages/mainline/ubuntu/ trusty nginx

and install new version

sudo apt-get update sudo apt-get install nginx

For sure check version

root@cfg01:/ # dpkg -l | grep nginx
ii  nginx                               1.9.9-1~trusty                   amd64        high performance web server

Now if you already have configured site with ssl you can just add http2

server {
  listen 443 ssl http2;
  ...

Also you must ensure for redirecting all traffic from http to https and disable spdy if is configured.

Finally to verify that HTTP/2 translation is working, you can use the “HTTP/2 and SPDY indicator” plug-in available for Google Chrome and Firefox or for online sites is tool here.

I have this problem with gzip compression.

Read More