当前位置:首页 » 《资源分享》 » 正文

nginx报错:./configure: error: SSL modules require the OpenSSL library. You can either

20 人参与  2024年04月23日 19:33  分类 : 《资源分享》  评论

点击全文阅读


nginx报错:./configure: error: SSL modules require the OpenSSL library. You can either

在nginx中配置监听443端口后重新加载配置文件出现此报错,

原因:未安装 ngx_http_ssl_module 模块

解决方法:

#执行命令查看nginx是否安装了 ngx_http_ssl_module/app/nginx/sbin/nginx -V#出现以下内容则说明未安装 ngx_http_ssl_modulenginx version: nginx/1.18.0built by gcc 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) configure arguments: --prefix=/app/nginx#找到nginx安装目录,我的目录在/install/nginx/nginx-1.18.0,依次执行以下命令cd /install/nginx/nginx-1.18.0./configure --prefix=/usr/local/nginx./configure --with-http_ssl_module#这里若出现报错提示以下信息:#/configure: error: SSL modules require the OpenSSL library.#You can either do not enable the modules, or install the OpenSSL library into the system, or build the OpenSSL library statically from the source with nginx by using --with-openssl= option.#说明未安装Openssl#可通过yum安装yum install openssl openssl-devel -y#安装完成后再次执行./configure --with-http_ssl_module#最后编译make && make install#编译完成后可通过命令查看ngx_http_ssl_module是否安装成功/usl/local/nginx/sbin/nginx -V#出现以下内容则安装完成#nginx version: nginx/1.18.0#built by gcc 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) #configure arguments: --prefix=/usr/local/nginx --user=nginx --group=nginx --with-http_stub_status_module#将原始的/app/nginx/sbin/nginx进行备份mv /app/nginx/sbin/nginx /app/nginx/sbin/nginx-bakcp /usr/local/nginx/sbin/nginx /app/nginx/sbin/nginx#启动nginx,并指定配置文件为/app/nginx/conf/nginx.conf/app/nginx/sbin/nginx -c /app/nginx/conf/nginx.conf

点击全文阅读


本文链接:http://zhangshiyu.com/post/99313.html

<< 上一篇 下一篇 >>

  • 评论(0)
  • 赞助本站

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

关于我们 | 我要投稿 | 免责申明

Copyright © 2020-2022 ZhangShiYu.com Rights Reserved.豫ICP备2022013469号-1