首页
分类
Links
About Me
Search
1
安装scim-googlepinyin@谷歌拼音输入法教程及错误解决办法
56,132 阅读
2
Windows下IP释放、更新、以及清除本地DNS缓存相关命令
11,732 阅读
3
中国移动烽火HG267GT、 HG260GT、烽火HG6821M光猫超级账号和超级密码
10,942 阅读
4
在 windows下刷日本 FC2 WHR-G301N路由器openwrt和DD-WRT教程(适用于XP/win7/win8)
10,314 阅读
5
微软skydrive网盘图片+MP3外链测试WordPress
8,601 阅读
杂文
学习
系统
电商
优惠
免费
软件
硬件
登录
Search
标签搜索
Godaddy
windows7
windows
WordPress
nginx
VPS
域名优惠码
openwrt
linux
优惠码
信用卡
免费空间
htaccess
Google
域名
Typecho
web.config
windows8
LEDE
主机
V-ZONE
累计撰写
127
篇文章
累计收到
282
条评论
首页
栏目
杂文
学习
系统
电商
优惠
免费
软件
硬件
页面
分类
Links
About Me
搜索到
1
篇与
的结果
2016-08-15
给已经编译安装了的nginx 添加http_ssl_module和http_v2_module模块方法(让Web服务器支持SSL和http2)
昨天给AMH4.2升级nginx后,想要使网站使用https,支持SSL和HTTP2,今天给网站<a href="https://vzone.me/873/" target="_blank">配置nginx规则</a>的时候,重启nginx却失效。 仔细检查规则后突然想起之前老版本的nginx只编译安装了SSL(http_ssl_module模块),却没有编译安装https(http_v2_module模块)。所以又开始百度找高手写的文章学习怎么不重装nginx的情况下添加新的http_v2_module模块,让其支持http2好了下面开始添加方法:nginx -V 然后我们可以看得到这样的信息。<strong>1、首选<span style="color:#303030;font-family:微软雅黑, "font-size:16px;line-height:32px;">看下编译安装nginx的时候,都编译安装的哪些模块。</span></strong> nginx version: nginx/1.9.9 built by gcc 4.7.2 (Debian 4.7.2-5) built with OpenSSL 1.0.1e 11 Feb 2013 TLS SNI support enabled configure arguments: --prefix=/usr/local/nginx --user=www --group=www --with-http_ssl_module --with-http_gzip_static_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --without-http_uwsgi_module --without-http_scgi_module仔细看就发现已经安装了http_ssl_module模块,缺少http_v2_module模块; 2、进入之前下载并解压了的源码包目录;重新编译nginx <span> </span> cd /usr/local/src/nginx-1.8.03、在刚才得到的编译信息后面添加http_v2_module模块在 ./configure 中加入:--with-http_v2_module ,如果没有 SSL 支持,还需要加入--with-http_ssl_module ./configure --prefix=/usr/local/nginx --user=www --group=www --with-http_ssl_module --with-http_gzip_static_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --without-http_uwsgi_module --without-http_scgi_module --with-http_v2_module 4、输入命令make进行编译 这一步千万不能 make install ;不然会把之前已经安装的nginx 覆盖掉 <strong>5、需要替换nginx二进制文件,先停止掉nginx进程;备份一下原来的启动脚本。</strong> cp /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.old; cp objs/nginx /usr/local/nginx/sbin/nginx; 6、查看nginx的模块,看下是否把需要的模块编译进去了 nginx -V 7、最后重新启动nginx
2016年08月15日
1,973 阅读
1 评论
0 点赞