网站首页 > 技术教程 正文
一、查看当前版本的nginx模块
/usr/local/nginx/sbin/nginx -V (前面是你的自定义目录)
可以查看已经存在的模块,将模块信息复制到txt文本中(供后面使用)
二、安装openssl
安装pcre包,zlib包,openssl
执行yum -y install pcre pcre-devel zlib zlib-devel openssl openssl-devel
三、重新编译nginx
找到解压完的nginx包下的configure文件
find -name configure
cd 进入该目录
执行./configure 指令,将之前复制好的当前存在的模块后加上 --with-http_ssl_module,只加–with-http_ssl_module 会编译覆盖原来的版本,原先模块就没了。
执行./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-file-aio --with-http_realip_module –with-http_ssl_module
此时会生成新的obj目录
四、执行make指令
执行 make
不要 make install
五、备份元nginx启动程序,将obj目录的nginx文件复制到原nginx目录下
通过 cp 指令复制备份nginx.bak
再通过 cp 复制obj的nginx到当前目录
检查nginx文件的正确性
./nginx -t
查看模块版本是否正确
./nginx -V
猜你喜欢
- 2024-10-10 Nginx之gzip模块(nginx配置gzip压缩)
- 2024-10-10 Nginx源码分析之模块初始化(初始化nginx命令)
- 2024-10-10 Nginx的Gzip模块配置指令(二)(nginx gzip json)
- 2024-10-10 nginx随机模块——ngx_http_random_index_module
- 2024-10-10 写一个Nginx的模块没有那么难(nginx 模块开发)
- 2024-10-10 Nginx模块主要有三种角色(nginx模块主要有三种角色和什么)
- 2024-10-10 后端开发组件,nginx从模块开始,让你对nginx有全新的理解
- 2024-10-10 12、Nginx模块配置应用——模块概述
- 2024-10-10 了解Nginx模块开发与架构,看这一篇就够了,图表齐全通俗易懂
- 2024-10-10 nginx有哪些模块(nginx有哪些功能)
你 发表评论:
欢迎- 最近发表
- 标签列表
-
- 下划线是什么 (87)
- 精美网站 (58)
- qq登录界面 (90)
- nginx 命令 (82)
- nginx .http (73)
- nginx lua (70)
- nginx 重定向 (68)
- Nginx超时 (65)
- nginx 监控 (57)
- odbc (59)
- rar密码破解工具 (62)
- annotation (71)
- 红黑树 (57)
- 智力题 (62)
- php空间申请 (61)
- 按键精灵 注册码 (69)
- 软件测试报告 (59)
- ntcreatefile (64)
- 闪动文字 (56)
- guid (66)
- abap (63)
- mpeg 2 (65)
- column (63)
- dreamweaver教程 (57)
- excel行列转换 (56)
本文暂时没有评论,来添加一个吧(●'◡'●)