nginx添加ssl模块的方法教程
前言
原已经安装好的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/
总结
以上就是这篇文章的全部内容了,希望本文的内容对大家的学习或者工作具有一定的参考学习价值,如果有疑问大家可以留言交流,谢谢大家对脚本之家的支持。
相关文章
Nginx反向代理proxy_cache_path directive is not allowed错误解决方法
这篇文章主要介绍了Nginx反向代理proxy_cache_path directive is not allowed错误解决方法,需要的朋友可以参考下2015-04-04网页502 Bad Gateway nginx/1.20.1报错的原因与解决方法
502 bad gateway nginx/1.20.1 是一个错误提示,通常出现在访问网站时出现问题,这篇文章主要给大家介绍了关于网页502 Bad Gateway nginx/1.20.1报错的原因与解决方法,需要的朋友可以参考下2024-03-03Nginx下实现pathinfo及ThinkPHP的URL模式
本篇文章主要介绍了Nginx下实现pathinfo及ThinkPHP的URL模式。小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧2017-05-05
最新评论