Chrome 51.0.2704.84 未请求 HTTP/2.0,但 Safari 和 Firefox 请求

Chrome 51.0.2704.84 not requesting HTTP/2.0, but Safari an Firefox did

我已经为 http2 服务配置了我的 nginx

    worker_processes 2;
    events {
        worker_connections 1024;
        multi_accept on;
        use epoll;
    }

http {
    sendfile on;

    server {
        listen 80;
        location / {
            return 301 https://$host$request_uri;
        }
    }

    server {
        listen 443 ssl http2;

        ssl_certificate     /usr/cer/server.cer;
        ssl_certificate_key /usr/cer/server.key;

        location / {
            root   /usr/share/nginx/html;
            index  index.html;
        }
    }
}

并带有日志消息

原因:

To address this, Google developed a new transport layer named SPDY. SPDY was accessed over SSL/TLS, and Google developed an SSL/TLS modification called Next Protocol Negotiation (NPN) that allows clients to upgrade their SSL/TLS connections from HTTP/1 to HTTP/2. Major web servers (such as NGINX) implemented SPDY; OpenSSL and other SSL/TLS stacks implemented NPN.

解决方案

Recompile NGINX from source and use a private build with OpenSSL 1.0.2