配置nginx --with-http_v2_module,
然后访问网址www.domain.com
是h2协议,好吧,完美!
但为什么domain.com
是http1.1协议?
有详细信息:
[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;
}
}
经过一段时间的研究,可能有一个解决方案:
在您访问网址之前,执行清除Chrome缓存(Command + Shift + Delete)。