Nginx: [emerg] the “ssl“ parameter requires ngx_http_ssl_module in /usr/local/nginx/conf/nginx.conf

268 篇文章 3 订阅 ¥129.90 ¥299.90




Nginx: [emerg] the “ssl“ parameter requires ngx_http_ssl_module in /usr/local/nginx/conf/nginx.conf


出现上面标题中的问题是因为我当初在安装Nginx的时候没有安装SSL模块,但是现在我在Nginx配置文件(nginx.cnf)中配置了SSL的相关配置信息。当我再次启动Nginx的时候就提示我nginx: [emerg] the "ssl" parameter requires ngx_http_ssl_module in /usr/local/nginx/conf/nginx.conf:111 了。下面我将我的解决方案给记录了下来,供大家参考哦!

解决问题

首先需要申明一下,我安装Nginx的目录是 /usr/local/nginx/ ,当时安装的时候是通过源码安装的,所以源码也在这个目录下面。接下来我们会利用源码加载 SSL 模块重新编译,如果你没有源码则可以选择重新安装新版 Nginx 进行解决。

先来看看 Nginx 的版本吧:
[root@xxx ~]
  • 15
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
问题分析: 根据引用\[1\]和引用\[2\]的错误提示信息,可以得出结论是在nginx的配置文件中使用了ssl参数,但是nginx缺少了ngx_http_ssl_module模块,导致无法识别ssl参数。引用\[3\]提供了解决方法,即需要重新编译安装nginx,并在编译配置中添加--with-http_ssl_module参数。 解决过程: 1. 打开终端,进入nginx的源码目录,例如/usr/local/src/nginx-1.8.0。 2. 运行以下命令来重新配置nginx的编译选项,添加--with-http_ssl_module参数: ./configure --with-http_ssl_module 3. 运行make命令编译nginx: make 4. 运行make install命令安装编译好的nginx: make install 5. 安装完成后,进入nginx的配置文件目录,例如/usr/local/nginx/conf。 6. 打开nginx.conf文件,确保在http块中有以下配置项: http { ... ssl on; ... } 7. 保存并关闭nginx.conf文件。 8. 重新启动nginx服务: /usr/local/nginx/sbin/nginx -s reload 通过以上步骤,你应该能够解决nginx配置文件中缺少ngx_http_ssl_module模块的问题,并成功启用ssl功能。 #### 引用[.reference_title] - *1* [nginx配置SSL数字证书、报错nginx: [emerg] the “sslparameter requires ngx_http_ssl_module in](https://blog.csdn.net/y393016244/article/details/129712192)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* *3* [nginx启动报 ssl parameter requires ngx_http_ssl_module](https://blog.csdn.net/yuan_618859/article/details/124918931)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

坦笑&&life

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值