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. php换行和<br />互转

    使用场景:在后台处理textarea换行的时候出现了问题, textarea里面的换行就是/n, 在textarea里面是有换行效果的,但是输出到其它地方没有效果,这时候就要用到PHP的神奇的nl2b ...

  2. Exp1 PC平台逆向破解 20165235 祁瑛

    Exp1 PC平台逆向破解 20165235 祁瑛 实践目标 本次实践的对象是一个名为pwn1的linux可执行文件.该程序正常执行流程是:main调用foo函数,foo函数会简单回显任何用户输入的字 ...

  3. Linux中目录以及路径问题

    具体参考:https://www.cnblogs.com/OctoptusLian/p/8546580.html 在Linux中,存在着绝对路径和相对路径 绝对路径:路径的写法一定是由根目录 / 写起 ...

  4. android emulator启动的两种方法详解

    android emulator启动的两种方法详解    转https://blog.csdn.net/TTS_Kevin/article/details/7452237 对于android学习者,模 ...

  5. G - Surf Gym - 100819S -逆向背包DP

    G - Surf Gym - 100819S 思路 :有点类似 逆向背包DP , 因为这些事件发生后是对后面的时间有影响. 所以,我们 进行逆向DP,具体 见代码实现. #include<bit ...

  6. js-面试题-驼峰命名

    //将字符串转为驼峰命名‘foo-bar-car-day-efg’ function toUpperCase(str){ var string=str.split('-'); var arr=[]; ...

  7. [CF1140C]Playlist

    Description: 给你n首歌,每首歌有一个长度\(a_i\)和美丽度\(b_i\) 现在可以选出最多k首,动听值为\(\sum a_i*min_{\sum b_i}\) Hint: \(n \ ...

  8. jQuery(三)

    jquery链式调用 jquery对象的方法会在执行完后返回这个jquery对象,所有jquery对象的方法可以连起来写: $('#div1') // id为div1的元素 .children('ul ...

  9. MyBatis(五)select返回list数据

    (1)接口中编写方法 public List<Emp> getEmps(String lastName); (2)编写Mapper文件 <select id="getEmp ...

  10. redis + cookies 实现持久登入

    通过登入把用户信息和token加载到redis中去, 将token和部分用户信息存储在cookie中, 下次登入时 判断cookie的token在redis中是否存在, 存在就把用户信息加载出来自动登 ...