nginx如果未开启SSL模块,配置https时提示错误

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

这是因为nginx缺少http_ssl_module模块,编译安装时带上淡出--with-http_ssl_module配置就行了,但是如果已经安装过了nginx,怎么添加模块呢?

1.切换到源码包:

  cd /opt/nginx/nginx-1.10.2/(替换为自己的源码包目录即可)

2.查看nginx原有的模块

  nginx -V

  原有配置信息如下:

    --pref=/usr/local/nginx

3.运行命令:./configure --pref=/usr/local/nginx --with-http_ssl_module

4.运行make(这里不要make install,否则会覆盖安装)

5.备份原有已安装好的nginx:cp /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.bak

6.停止nginx运行:nginx -s stop

7.将刚刚编译好的nginx覆盖掉原有的nginx:cp ./objs/nginx /usr/local/nginx/sbin/nginx

8.启动nginx:nginx

9.运行:nginx -V 查看是否已成功加入

    

nginx: [emerg] the "ssl" parameter requires ngx_http_ssl_module in ......的更多相关文章

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

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

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

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

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

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

  7. Nginx上安装SSL证书

    准备 参考 :链接 下载的Nginx证书压缩文件解压后包含: .pem:证书文件.PEM文件的扩展名为CRT格式. .key:证书密钥文件.申请证书时如果未选择自动创建CRS,则下载的证书文件压缩包中 ...

  8. nginx:[emerg]unknown directive "ssl"

    nginx: [emerg] unknown directive "ssl" in /usr/local/nginx/conf/nginx.conf:102 到解压的nginx目录 ...

  9. nginx: [emerg] BIO_new_file("/etc/nginx/ssl_key/server.crt") failed (SSL: error:02001002:syste

    Centos 7.5 nginx+web集群配置https报错 报错信息: [root@lb01 conf.d]# nginx -tnginx: [emerg] BIO_new_file(" ...

随机推荐

  1. Eclipse 那些小技巧(值得收藏)

    1.菜单命令系列 Edit→content Assist→add Alt+/ 代码关联 Windows→Next Editor→add Ctrl+Tab 切换窗口 Run→Debug Toggle L ...

  2. Bumped! 2017 ICPC North American Qualifier Contest (分层建图+dijstra)

    题目描述 Peter returned from the recently held ACM ICPC World finals only to find that his return flight ...

  3. java自动化-数据驱动junit演示,下篇

    本文旨在帮助读者介绍,如何使用excle实现数据驱动 本文是上文https://www.cnblogs.com/xuezhezlr/p/9096063.html的继续,如果没看上文建议自己看一下,对理 ...

  4. BZOJ5335 : [TJOI2018]智力竞赛

    二分答案,转化成求最少的路径,覆盖住所有权值$\leq mid$的点. 建立二分图,若$i$的后继为$j$,则连边$i\rightarrow j$,求出最大匹配,则点数减去最大匹配数即为最少需要的路径 ...

  5. es6的基本数据详解

    一.Set 基本用法:   1)ES6提供了新的数据机构-Set. 它类似于数组,但是成员的值都是唯一的,没有重复的值.Set本身是一个构造函数,用来生成Set数据结构. 先来看一段最简单的代码: 1 ...

  6. java中的HMAC-SHA1加密

    public class Sha1Util { private static final String MAC_NAME = "HmacSHA1"; private static ...

  7. 配置JDK环境变量与配置JRE

    1. 如何配置jdk,x下载jdk     网站: https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-21 ...

  8. Notepad++常用快捷键

    Ctrl-H    打开Find / Replace 对话框 Ctrl-D    复制当前行 Ctrl-L    删除当前行 Ctrl-T    上下行交换 F3    找下一个 Shift-F3   ...

  9. 怎么用JQUERY设置div背景图片?

    平常,在css里,我们写成 { background:url(....) ; } 如果需要写脚本, 则 function(){ .....; $(....).css("background- ...

  10. ndk编译libx264生成库

    编译脚本如下: TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64 function build_x26 ...