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的更多相关文章

  1. 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 ...

  2. 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 ...

  3. nginx: [emerg] the "ssl" parameter requires ngx_http_ssl_module in ......

    nginx如果未开启SSL模块,配置https时提示错误 nginx: [emerg] the "ssl" parameter requires ngx_http_ssl_modu ...

  4. 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 ...

  5. 已安装nginx支持https配置 the "ssl" parameter requires ngx_http_ssl_module

    原文链接:https://blog.seosiwei.com/detail/28 nginx已安装,ssl模块未安装的解决方法: 如果需要在linux中编译自己的nginx服务器,请参照:https: ...

  6. nginx: [emerg] directive "location" has no opening "{" in /usr/local/nginx//conf/nginx.conf:75

    1.报错:[emerg]directive "location" has no opening "{" in ..... 解决方法: 由于对应行或者附近行的“{ ...

  7. 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 ...

  8. 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 ...

  9. 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) ...

随机推荐

  1. extjs控制器调用其他视图的函数实现控件赋值。

  2. 【转】CSG(Closed Subscriber Group)闭合用户组

    CSG是3GPP R8中引入的概念,定义为闭合用户组.有以下特点: 1. 每个CSG由一个CSG ID标识 2. 同一用户可属于多个CSG,用户与CSG的关系就好比签约,启用了CSG小区只会允许签约用 ...

  3. mycat 实践扩容

    实践扩容, travelrecord表定义为10个分片,尝试将10个分片中的2个分片转移到第二台MySQL上 1--定义10个分片<table name="travelrecord_t ...

  4. pthread_cond_wait 详解

    转自:http://www.xuebuyuan.com/2173853.html pthread_cond_wait() 用于阻塞当前线程,等待别的线程使用pthread_cond_signal()或 ...

  5. appium_python 实现手势密码

    直接上代码吧: from appium.webdriver.common.touch_action import TouchAction from driver import AppiumTest # ...

  6. Json-lib 进行java与json字符串转换之一

    这篇文章主要介绍了在java中,JSON字符串与java对象的相互转换实例详解,非常不错,具有参考借鉴价值,需要的朋友可以参考下. 在开发过程中,经常需要和别的系统交换数据,数据交换的格式有XML.J ...

  7. myeclipse与eclipse的web项目部署区别

    一.myeclipse之web项目的部署(发布)流程 web项目的部署(发布)流程2008-01-18 14:35 在myeclipse下新建web工程abc.系统设置默认如下: 项目保存位置:wor ...

  8. 类型:.net;问题:asp.net window验证;结果:细说ASP.NET Windows身份认证

    细说ASP.NET Windows身份认证 阅读目录 开始 认识ASP.NET Windows身份认证 访问 Active Directory 在ASP.NET中访问Active Directory ...

  9. CentOS6.5 释放SWAP

      虚拟内存的释放一般都是伴随着关闭应用程式来说的   可以通过命令刷新swap还原到初始状态: swapoff -a swapon -a     例如: [root@wjlcn1026 vm]# f ...

  10. import json