旧版Nginx存在漏洞, 在不影响生产使用的情况下升级nginx
下载稳定版Nginx http://nginx.org/en/download.html
![](https://downloadfile.oss-cn-shanghai.aliyuncs.com/blog/uploads/2022/08/微信图片_20220801094758.png)
解压
![](https://downloadfile.oss-cn-shanghai.aliyuncs.com/blog/uploads/2022/08/批注-2022-08-01-094340-1.png)
进入解压目录, 执行安装命令
./configure && make && make install
![](https://downloadfile.oss-cn-shanghai.aliyuncs.com/blog/uploads/2022/08/批注-2022-08-01-094341.png)
安装后, 安装目录会生成一个 objs目录, 将objs目录下新生成得nginx文件, Copy到旧版sbin目录下
![](https://downloadfile.oss-cn-shanghai.aliyuncs.com/blog/uploads/2022/08/批注-2022-08-01-094239.png)
授权nginx chmod 755 nginx
测试nginx
./nginx -t 显示susseful
./nginx -s reload 重启nginx