小编erw*_*win的帖子

为什么 Chrome 浏览器无法识别我的 nginx http2 服务器?

我按照Digital Ocean 论文设置了我的 Nginx conf ,现在 http2 可用...

但是在 Chrome(版本 54.0.2840.98(64 位))开发工具中,它总是在 HTTP 1/1 上:

NAME             METHOD  STATUS  PROTOCOL
shell.js?v=xx..    GET    200     http/1.1
Run Code Online (Sandbox Code Playgroud)

我的服务器运行的是支持 ALPN 和 NPN 的 Ubuntu 16.04 LTS,它附带的 openssl 版本是 1.0.2g

我使用此工具站点检查了 http2 支持,结果是:

Yeah! example.com supports HTTP/2.0. ALPN supported...
Run Code Online (Sandbox Code Playgroud)

也检查 curl 是可以的

 $ curl -I --http2 https://www.example.com
  HTTP/2 200 
  server: nginx/1.10.0 (Ubuntu)
  date: Tue, 13 Dec 2016 15:59:13 GMT
  content-type: text/html; charset=utf-8
  content-length: 5603
  x-powered-by: Express
  cache-control: public, max-age=0
  etag: W/"15e3-EUyjnNnyevoQO+tRlVVZxg"
  vary: …
Run Code Online (Sandbox Code Playgroud)

nginx google-chrome http2

6
推荐指数
1
解决办法
1万
查看次数

标签 统计

google-chrome ×1

http2 ×1

nginx ×1