首页 > Web开发 > 详细

nginx支持http2

时间:2018-05-18 12:50:40      阅读:170      评论:0      收藏:0      [点我收藏+]

前提

  1. nginx  >= 1.9.14
  2. openssl >= 1.0.2

编译

./configure --with-http_v2_module --with-openssl=/home/app/openssl-1.0.2o --with-debug

新增--with-http_v2_module --with-openssl=/home/app/openssl-1.0.2o编译指令,注意with-openssl 为openssl的源代码目录。

若工程遵循nginx的开发模式,且具备config配置文件,nginx会将该源代码编译成模块,并链接到自身的二进制可执行文件中。

配置

listen 指令中增加http2

技术分享图片 

http2 标准并没有规定使用https,但是现行的浏览器不支持没有加密的http2,所以使用https成了事实标准。

验证

技术分享图片

 

http://nginx.org/en/docs/http/ngx_http_v2_module.html

nginx支持http2

原文:https://www.cnblogs.com/nginx-core/p/9055161.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!