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进程关闭
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 requ ...
- the "ssl" parameter requires ngx_http_ssl_module in /usr/local/nginx/conf/nginx.conf
一:开始Nginx的SSL模块 1.1 Nginx如果未开启SSL模块,配置Https时提示错误 原因也很简单,nginx缺少http_ssl_module模块,编译安装的时候带上--with-htt ...
- nginx: [emerg] the "ssl" parameter requires ngx_http_ssl_module in ......
nginx如果未开启SSL模块,配置https时提示错误 nginx: [emerg] the "ssl" parameter requires ngx_http_ssl_modu ...
- nginx 使用HTTPS协议-SSL证书模块报错解决-附nginx安装 : [emerg] the "ssl" parameter requires ngx_http_ssl_module in nginx.c
Linux系统下ngnix使用HTTPS协议启动报错: nginx: [emerg] the "ssl" parameter requires ngx_http_ssl_modul ...
- 已安装nginx支持https配置 the "ssl" parameter requires ngx_http_ssl_module
原文链接:https://blog.seosiwei.com/detail/28 nginx已安装,ssl模块未安装的解决方法: 如果需要在linux中编译自己的nginx服务器,请参照:https: ...
- nginx: [emerg] directive "location" has no opening "{" in /usr/local/nginx//conf/nginx.conf:75
1.报错:[emerg]directive "location" has no opening "{" in ..... 解决方法: 由于对应行或者附近行的“{ ...
- Nginx nginx: [emerg] using regex "\.php$" requires PCRE library 或 编译nginx错误:make[1]: *** [/pcre//Makefile] Error 127
nginx: [emerg] using regex "\.php$" requires PCRE library 或 编译nginx错误:make[1]: *** [/pcre ...
- nginx: [emerg] unknown directive "聽" in D:\software03\GitSpace\cms\nginx-1.14.0/conf/nginx.conf:36
nginx: [emerg] unknown directive "聽" in D:\software03\GitSpace\cms\nginx-1.14.0/conf/nginx ...
- 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) ...
随机推荐
- 关于文件结束符EOF
EOF 是 End Of File 的缩写. 在 C 语言中,它是在标准库中定义的一个宏. 人们经常误认为 EOF 是从文件中读取的一个字符(牢记).其实,EOF 不是一个字符,它被定义为是 int ...
- JavaScript去除字符串两边空格trim
去除字符串左右两端的空格,在大部分编程语言中,比如PHP.vbscript里面可以轻松地使用 trim.ltrim 或 rtrim实现.但在js中却没有这3个内置方法,需要手工编写.下面的实现方法是用 ...
- MySQL 学习五 SQL实用函数
0 select now() 显示当前时间. 1 select char_length('andyqan') 显示字符长度. 2 日期格式化 select date_format( ...
- [Chapter 3 Process]Practice 3.1 相关知识:进程创建、fork函数
3.1 Using the program shown in the Figure3.30, explain what the output will be at LINE A 答案:LINE A 处 ...
- 第六章 Java并发容器和框架
ConcurrentHashMap的实现原理与使用 ConcurrentHashMap是线程安全且高效的hashmap.本节让我们一起研究一下该容器是如何在保证线程安全的同时又能保证高效的操作. 为什 ...
- Win7无法访问Windows共享文件夹
解决方法如下 On the Windows 7 machine: Run secpol.msc Drill down through Local Policies | Security Options ...
- vi,sed,tr,awk技巧
将文件中的换行替换为逗号 使用sed: sed -e :a -e N -e '$!ba' -e 's/\n/,/g' filename 使用tr: cat filename | tr '\n' ',' ...
- 包学会之浅入浅出Vue.js:开学篇
2016年,乃至接下来整个2017年,如果你要问前端技术框架什么最火,那无疑就是前端三巨头:React.Angular.Vue.没错,什么jQuery,seaJs,gulp等都逐渐脱离了热点.面试的时 ...
- 杀死tomcat进程
由于tomcat运行时eclipse非法关闭,导致tomcat进程没有关闭,再次启动eclipse,启动tomcat会报tomcat不能启动,且指出端口被占用.笔者解决方案如下: 方案一:重启电脑,简 ...
- LaTeX数学公式基础
LaTeX数学公式 参考:https://www.cnblogs.com/Sinte-Beuve/p/6160905.html 原博客显示有点问题,重新搬运整理LaTeX数学公式部分的基本用法 基础 ...