当前位置:   首页安装配置学习这篇文章:nginx添加ssl模块的方法教程

学习这篇文章:nginx添加ssl模块的方法教程

发布日期:2022-01-07 09:58 | 文章来源:CSDN

前言

原已经安装好的nginx,如果不清楚安装方法的朋友可以参考这篇文章:https://www.jb51.net/article/128758.htm

现在需要添加一个未被编译安装的ssl模块:

nginx -V 可以查看原来编译时都带了哪些参数

原来的参数:

--prefix=/app/nginx

添加的参数:

--with-http_stub_status_module --with-http_ssl_module --with-http_realip_module

步骤如下:

1. 使用参数重新配置:

./configure --prefix=/app/nginx -user=nobody -group=nobody --with-http_stub_status_module \
--with-http_ssl_module --with-http_realip_module \
--add-module=../nginx_upstream_hash-0.3.1/ \
--add-module=../gnosek-nginx-upstream-fair-2131c73/

2. 编译:

make
#不要make install,否则就是覆盖安装

3. 替换nginx二进制文件:

cp /app/nginx/sbin/nginx /app/nginx/sbin/nginx.bak
cp ./objs/nginx /app/nginx/sbin/

总结

以上就是这篇文章的全部内容了,希望本文的内容对大家的学习或者工作具有一定的参考学习价值,如果有疑问大家可以留言交流,谢谢大家对本站的支持。

联系我们
关于使用场景和技术架构的更多咨询,请联系我们的销售和技术支持团队。
Yingsoo Host

在线
客服

在线客服:7*24小时在线

客服
热线

400-630-3752
7*24小时客服服务热线

关注
微信

关注官方微信
顶部