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

SSL相关的配置加到了nginx的配置文件中后,nginx竟然启动不起来了

于是用如下命令测试问题所在:

/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

其中,/usr/local/nginx/sbin/nginx 是我的nginx安装后的可执行程序路径,/usr/local/nginx/conf/nginx.conf 是我的nginx主配置文件路径。

该命令输出如下:

可见,nginx缺少SSL模块支持。所以以前编译nginx的时候使用了不带SSL支持的默认编译参数。
为了让nginx添加SSL模块,只能重新编译它。但是,如何在现有nginx的基础上,添加一个支持SSL的编译参数呢?首先要找回原来编译nginx时的编译参数,然后再加上支持SSL的编译参数。如果不这样做,那么编译出来的nginx可能就会有问题(某些旧的编译参数被去掉了,使得nginx不能支持某些功能)。

先查看旧的nginx的编译参数:

/usr/local/nginx/sbin/nginx -V

可见,当时我编译nginx的时候,没有加ssl参数 ,那么现在事情就好办了:回到nginx的源码目录下,加上SSL支持参数重新编译:

./configure --prefix=/usr/local/nginx --with-http_realip_module --with-http_image_filter_module=dynamic --with-http_ssl_module

make

注意:编译时nginx进程关闭

原文地址:https://www.cnblogs.com/pipiyan/p/10784484.html

时间: 2024-08-26 09:54:11

nginx: [emerg] the "ssl" parameter requires ngx_http_ssl_module in /usr/local/nginx//conf/nginx.conf:117的相关文章

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

一:开始Nginx的SSL模块 1.1 Nginx如果未开启SSL模块,配置Https时提示错误 1 nginx: [emerg] the "ssl" parameter requires ngx_http_ssl_module in /usr/local/nginx/conf/nginx.conf:37 原因也很简单,nginx缺少http_ssl_module模块,编译安装的时候带上--with-http_ssl_module配置就行了,但是现在的情况是我的nginx已经安装过了,

nginx: the "ssl" parameter requires ngx_http_ssl_module in /usr/local/nginx/conf/nginx.conf

Nginx如果未开启SSL模块,配置Https时将提示如题错误 原因:nginx缺少http_ssl_module模块,编译安装的时候带上--with-http_ssl_module配置就行了,但是现在的情况是我的nginx已经安装过了,怎么添加模块(我的nginx的安装目录是/usr/local/nginx这个目录,我的源码包在/home/nginx-1.16.1目录) 1.切换到源码包:cd /home/nginx-1.16.1 执行:./configure --prefix=/usr/lo

nginx: [error] invalid PID number “” in “/usr/local/var/run/nginx/nginx.pid”

在Mac上用brew安装Nginx,然后修改Nginx配置文件,再重启时报出如下错误: nginx: [error] invalid PID number "" in "/usr/local/var/run/nginx/nginx.pid" 解决办法: $ sudo nginx -c /usr/local/etc/nginx/nginx.conf $ sudo nginx -s reload

nginx: [error] open() "/usr/local/var/run/nginx.pid" failed (2: No such file or directory)

nginx: [error] open() "/usr/local/var/run/nginx.pid" failed (2: No such file or directory) 2017年09月14日 09:15:45 阅读数:7742 启动Nginx出现这个错误 nginx: [error] open() "/usr/local/var/run/nginx.pid" failed (2: No such file or directory) 1  解决方法:找

15.Nginx负载均衡&SSL密钥对&Nginx配置SSL

[toc] 扩展 针对请求的uri来代理 http://ask.apelearn.com/question/1049 根据访问的目录来区分后端的web http://ask.apelearn.com/question/920 nginx长连接 http://www.apelearn.com/bbs/thread-6545-1-1.html nginx算法分析 http://blog.sina.com.cn/s/blog_72995dcc01016msi.html Nginx负载均衡 负载均衡在服

图文:CentOS 下对 Nginx + Tomcat 配置 SSL 实现服务器 / 客户端双向认证

1. 安装 nginx 1.1 nginx 包及其依赖包下载 出于模块的依赖性,Nginx 依赖以下三个包: gzip 模块需要 zlib 库(http://www.zlib.net/): rewrite 模块需要 pcre 库(http://www.pcre.org/): ssl 功能需要 openssl 库(http://www.openssl.org/): 分别下载它们的最新稳定版(截至本文最新稳定版分别是 zlib-1.2.8.tar.gz.pcre-8.36.tar.gz.openss

nginx多域名ssl证书以及lua模块的编译安装

#!/bin/bash #unzip zip&tar file function  untarfile(){ for i in $( ls . |grep -v .sh) do val=$(echo $i | grep ".zip$" |wc -l) if [[ "$val"  -eq  1 ]];then dirname=$(echo $i|sed "s/.zip//") if [[ ! -d $dirname ]];then echo

修复OpenSSL漏洞 升级OpenSSL版本 nginx静态编译ssl模块

背景 OpenSSL全称为Secure Socket Layer,是Netscape所研发,利用数据加密(Encryption)作技术保障在Internet上数据传输的安全.可确保数据在网络上的传输不会被窃听及截取. 当然,OpenSSL是一个强大的密码库,我们在使用SSL协议的时候不一定非得采用OpenSSL,不过目前基本上都是用的OpenSSL,因为它更安全,使用起来也更简单. 通常出现的OpenSSL的漏洞需要升级版本解决 查看openssl版本 openssl version 进入存放源

nginx安装配置ssl认证

listen 443; server_name _ ; root "/data/fun_bqt/public/"; ssl on; ssl_certificate /usr/local/nginx/bjbdr/1_xxx.crt; #ssl证书存放路径 ssl_certificate_key /usr/local/nginx/bjbdr/2_xxx.key ; #ssl证书存放路径 ssl_session_timeout 5m; ssl_protocols TLSv1 TLSv1.1