问题

Ubuntu直接用apt-get install nginx命令更新只能升级到1.10.3版本,无法使用Http2和Grpc。

解决

先在/etc/apt/sources.list添加下面两行

Debian

1
2
deb http://nginx.org/packages/debian/ squeeze nginx
deb-src http://nginx.org/packages/debian/ squeeze nginx

Ubuntu

1
2
deb http://nginx.org/packages/ubuntu/ lucid nginx
deb-src http://nginx.org/packages/ubuntu/ lucid nginx

然后 apt-get install nginx 就可以