赞
踩
nginx(https) 添加 --with-http_stub_status_module --with-http_ssl_module
环境: 已安装nginx
环境插件
yum -y install openssl openssl-devel make zlib zlib-devel gcc gcc-c++ libtool pcre pcre-devel
重新添加:--with-http_stub_status_module --with-http_ssl_module
1)进入nginx原文件路径
cd nginx-1.18.0
2)重新编译,添加模块 --with-http_stub_status_module --with-http_ssl_module
./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_v2_module --with-ipv6
3)编译 make #不要 make install
make
4)备份&拷贝
- #备份旧程序
- cp /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.bak
-
- #拷贝
- cp -r objs/nginx /usr/local/nginx/sbin/nginx
5)检查&重启nginx
- # 检查
- /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
- #重启
- /usr/local/nginx/sbin/nginx -s reload
6)检查模块是否加载
- /usr/local/nginx/sbin/nginx -V
-
- 如下是成功:
- nginx version: nginx/1.18.0
- built by gcc 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC)
- built with OpenSSL 1.0.2k-fips 26 Jan 2017
- TLS SNI support enabled
- configure arguments: --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。