0

configuration nginx --with-http_v2_module,

and then access the url www.domain.com is h2 protocol, ok, perfectly!

but why domain.com is http1.1 protocol?

there are details:

[root@iZ941gs04jwZ ~]# nginx -V
nginx version: nginx/1.12.0
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) 
built with OpenSSL 1.0.2l  25 May 2017
TLS SNI support enabled
configure arguments: --prefix=/usr/local/webserver/nginx --with-http_stub_status_module --with-http_ssl_module --with-pcre=/root/tmp/pcre-8.35 --with-http_v2_module --with-openssl=../openssl-1.0.2l

nginx.conf

server {
    listen       443 ssl http2 fastopen=3 reuseport;
    server_name  beizimu.com www.beizimu.com;

    ssl_certificate      /etc/letsencrypt/live/beizimu.com/cert.pem;
    ssl_certificate_key  /etc/letsencrypt/live/beizimu.com/privkey.pem;

    #ssl_session_cache    shared:SSL:1m;
    #ssl_session_timeout  5m;

    ssl_ciphers  HIGH:!aNULL:!MD5;
    ssl_prefer_server_ciphers  on;

    location / {
        root   html;
        index  index.html index.htm;
    }
}

enter image description here


After a period of study, may be There is a solution:

do clear Chrome cache(Command + Shift + Delete) before u access the url.

Sodino
  • 587
  • 6
  • 16

0 Answers0