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的安装目录是/usr/local/nginx这个目录,我的源码包在/usr/local/src/nginx-1.6.2目录
1.2 Nginx开启SSL模块
切换到源码包:
1
|
cd /usr/local/src/nginx-1.11.3 |
查看nginx原有的模块
1
|
/usr/local/nginx/sbin/nginx -V |
在configure arguments:后面显示的原有的configure参数如下:
1
|
--prefix=/usr/local/nginx --with-http_stub_status_module |
那么我们的新配置信息就应该这样写:
1
|
./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_modul |
运行上面的命令即可,等配置完
配置完成后,运行命令
1
|
make |
这里不要进行make install,否则就是覆盖安装
然后备份原有已安装好的nginx
1
|
cp /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.bak |
然后将刚刚编译好的nginx覆盖掉原有的nginx(这个时候nginx要停止状态)
1
|
cp ./objs/nginx /usr/local/nginx/sbin/ |
然后启动nginx,仍可以通过命令查看是否已经加入成功
1
|
/usr/local/nginx/sbin/nginx -V |
Nginx 配置Http和Https共存
1
2
3
4
5
6
7
8
9
|
server { listen 80 default backlog=2048; listen 443 ssl; server_name wosign.com; root / var /www/html; ssl_certificate /usr/local/Tengine/sslcrt/ wosign.com.crt; ssl_certificate_key /usr/local/Tengine/sslcrt/ wosign.com .Key; } |
把ssl on;这行去掉,ssl写在443端口后面。这样http和https的链接都可以用
Nginx 配置SSL安全证书重启避免输入密码
可以用私钥来做这件事。生成一个解密的key文件,替代原来key文件。
1
|
openssl rsa - in server.key - out server.key.unsecure |
Nginx SSL性能调优
1
2
3
4
5
|
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4:HIGH:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!AESGCM; ssl_prefer_server_ciphers on ; ssl_session_cache shared:SSL:10m; ssl_session_timeout 10m; |
nginx: [emerg] the "ssl" parameter requires ngx_http_ssl_module in /usr/local/nginx/conf/nginx.conf:37的更多相关文章
- 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 ...
- 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) ...
随机推荐
- LeetCode 90. Subsets II (子集合之二)
Given a collection of integers that might contain duplicates, nums, return all possible subsets. Not ...
- JavaScript数组去重方法汇总
1.运用数组的特性 1.遍历数组,也遍历辅助数组,找出两个数组中是否有相同的项,若有则break,没有的话就push进去. //第一版本数组去重 function unique(arr){ var r ...
- linux中的权限
第1章 显示或设置网络相关信息 1.1 ip address 与ifconfig 类似 [root@znix ~]# ip address 1: lo: <LOOPBACK,UP,LOWER_U ...
- 使用Lock锁生产者消费者模式
package com.java.concurrent; import java.util.concurrent.locks.Condition; import java.util.concurren ...
- HTML学习笔记 cs动画基础(分列效果可用于做瀑布流) 第十五节 (原创) 参考使用表
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- Python学习--字典
在Python中通过名字来引用值的数据结构称为映射(mapping).字典是Python中唯一内建(Python解释器本身支持,不需要import)的映射类型.字典中的值没有特殊的顺序,都存储在一个特 ...
- windows服务启动有界面的程序
大家写windows服务守护进程的时候,肯定会遇到启动的程序看不到界面,只能在任务管理器里面看到xxx.exe问题. 发现可能有如下情况 a.无论是开机,还是程序被关掉后,守护服务启动的程序只能看到任 ...
- C#配合利用XML文件构建反射表机制
在设计程序时,无论是界面或是后台代码,我们通常都想留给用户一个较为简单的接口.而我在参与封装语音卡开发函数包的时候,发现各种语音卡的底层函数的接口都是各种整形变量标记值,使用起来极为不变.于是就理解了 ...
- java 压缩导出多个excel
简单介绍下我实现的功能,首先是我的excel上传,它是以blob字段存储在oracel数据库中的,我实现的是循环遍历blob字段并使用io流进行打包下载,如有需要可自行修改 使用技术有,springM ...
- vue打包之后生成一个配置文件修改接口
前言: 我们的vue代码打包上传到服务器之后, 要是数据接口 以后换了域名什么的,是不是需要重新去vue文件里修改接口. 能不能生成一个配置文件,里面可以配置域名或其它什么字段之类的,这样以后换了域名 ...