当前位置:   article > 正文

nginx升级,添加ssl模块_--with-http-stub

--with-http-stub

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)备份&拷贝

  1. #备份旧程序
  2. cp /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.bak
  3. #拷贝
  4. cp -r objs/nginx /usr/local/nginx/sbin/nginx

5)检查&重启nginx

  1. # 检查
  2. /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
  3. #重启
  4. /usr/local/nginx/sbin/nginx -s reload

6)检查模块是否加载

  1. /usr/local/nginx/sbin/nginx -V
  2. 如下是成功:
  3. nginx version: nginx/1.18.0
  4. built by gcc 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC)
  5. built with OpenSSL 1.0.2k-fips 26 Jan 2017
  6. TLS SNI support enabled
  7. configure arguments: --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/凡人多烦事01/article/detail/639992
推荐阅读
相关标签
  

闽ICP备14008679号