SSL漏洞 443端口 nginx 重新编译指定ssl版本

1、下载最新SSL安装包,https://www.openssl.org/source/  查看最新版本

wget -O openssl-1.1.1k.tar.gz https://www.openssl.org/source/openssl-1.1.1k.tar.gz

2、解压ssl安装包

tar -zxf openssl-1.1.1k.tar.gz

3、下载最新nginx安装包,http://nginx.org/en/download.html 查看最新版本

wget http://www.nginx.org/download/nginx-1.19.9.tar.gz

4、解压nginx 安装包

tar -zxvf nginx-1.19.9.tar.gz

5、解压目录执行 ./configure <编译参数> <第三方插件

编译参数:可以参考当前编译参数,在ngixn 执行文件目录 执行 nginx -V 显示nginx 信息,上面有当前参数配置

第三方插件:地方插件增减 ssl 配置 ,with-openssl 指定的就是之前解压的ssl安装包路径

./configure --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --pid-path=/run/nginx.pid --lock-path=/run/lock/subsys/nginx --user=nginx --group=nginx --with-http_ssl_module --with-http_stub_status_module --with-openssl=/home/nginx-1.19.9/openssl-1.1.1k --with-http_stub_status_module

6、执行 make(只编译不安装)

7、备份旧版本执行文件

mv nginx nginxold

8、新编译好的nginx 执行文件在objs 目录下,将新编译好的执行文件复制到旧版执行文件目录,执行 nginx -t 进行测试启动   successful 表示测试启动成功

9、平滑重启nginx

nginx -s reload

10、执行 ngxin -V 查看ssl 信息已经切换成最新版,并且nginx 也升级到最新版

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值