内容简介:从源码编译安装此时安装的
http2 需要 https 支持,假设你已经有https证书
从源码编译安装 openresty
解压: tar -xzvf openresty-VERSION.tar.gz cd openresty-VERSION/ 三连: ./configure make sudo make install
此时安装的 openresty 配置http2会报错 the "http2" parameter requires ngx_http_v2_module
./configure --with-http_v2_module
编译完成后 make (不要make insall ,会覆盖安装)
编译出的nginx在 openresty-1.13.6.2/build/nginx-1.13.6/objs/ 里
我们之拥替换此二进制文件就好了
nginx -s stop 先停止 nginx
将 openresty-1.13.6.2/build/nginx-1.13.6/objs/nginx 复制到 /usr/local/openresty/nginx/sbin
不先停止nginx的话会出现 cp: 无法创建普通文件'./nginx': 文本文件忙
然后将 listen 的 http2 配置上启动 nginx 应该就可以看到
如果替换了新编译的 nginx 二进制文件还是使用http1.1,检查一下 openssl 版本和编译的模块, openssl 版本需大于 1.0.1 才能支持 http2
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
C# Primer Plus
Klaus Michelsen / Sams / 2001-12-15 / USD 49.99
C# Primer Plus is a tutorial based introduction to the C# language and important parts of the .Net Framework. Throughout the book the reader will be exposed to proven principles enabling him to write ......一起来看看 《C# Primer Plus》 这本书的介绍吧!