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-http_ssl_module配置就行了,但是现在的情况是我的nginx已经安装过了,怎么添加模块,其实也很简单,往下看: 做个说明:我的nginx的安装目录是/usr/local/nginx这个目录,我的源码包在/usr/local/src/nginx-1.6.2目录
|
1
|
nginx: [emerg] the "ssl" parameter requires ngx_http_ssl_module in /usr/local/nginx/conf/nginx.conf:37 |
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_module |
运行上面的命令即可,等配置完
配置完成后,运行命令
|
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; |
the "ssl" parameter requires ngx_http_ssl_module in /usr/local/nginx/conf/nginx.conf的更多相关文章
- 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 ...
- 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 ...
- 已安装nginx支持https配置 the "ssl" parameter requires ngx_http_ssl_module
原文链接:https://blog.seosiwei.com/detail/28 nginx已安装,ssl模块未安装的解决方法: 如果需要在linux中编译自己的nginx服务器,请参照:https: ...
- 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: [emerg] the "ssl" parameter requires ngx_http_ssl_module in ......
nginx如果未开启SSL模块,配置https时提示错误 nginx: [emerg] the "ssl" parameter requires ngx_http_ssl_modu ...
- PHP 5.6启动失败failed to open configuration file '/usr/local/php/etc/php-fpm.conf'
PHP编译安装完毕,启动失败,提示 [-Jun- ::] ERROR: failed to open configuration ) [-Jun- ::] ERROR: failed to load ...
- 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) ...
- nginx: [error] invalid PID number “” in “/usr/local/var/run/nginx/nginx.pid”
在Mac上用brew安装Nginx,然后修改Nginx配置文件,再重启时报出如下错误: nginx: [error] invalid PID number "" in " ...
- 【防坑指南】nginx重启后出现[error] open() “/usr/local/var/run/nginx/nginx.pid” failed
重新启动nginx后,出现报错,原因就是下没有nginx文件夹或没有nginx.pid文件,为什么会没有呢? 原因就是每次重新启动,系统都会自动删除文件,所以解决方式就是更改pid文件存储的位置, 打 ...
随机推荐
- C# 读自己的资源文件
Assembly assm = this.GetType().Assembly;//Assembly.LoadFrom(程序集路径); foreach (string resName in assm. ...
- 【c++】动态内存
静态存储区:内存在程序编译的时候就已经分配好,这块内存在程序的整个运行期间都存在.它主要存放静态数据.全局数据和常量.注意:const常量在定义时必须初始化 栈区:在执行函数时,函数内局部变量的存储单 ...
- vue - 官方 - 上手
Vue和其它框架一样,有用CDN或本地JavaScript框架,国内我推荐 bootstrap cdn. 为什么很多人选择CDN呢? CDN:内容分发网络(不同区域不同服务器,更快),减少本地服务器压 ...
- vue 手风琴组件
1.创建组件 SqueezeBox.vue <!-- 手风琴(三级折叠列表) 组件 --> <template> <div class="header" ...
- Linux OpenSSH后门的加入与防范
引言:相对于Windows,Linux操作系统的password较难获取.只是非常多Linuxserver配置了OpenSSH服务.在获取root权限的情况下,能够通过改动或者更新OpenSSH代码等 ...
- 在linux命令行中编译和运行java文件
同时加载编译多个jar包和java文件 在个人平常使用或者当我们把代码部署到linux服务器上的时候,我们经常需要通过命令行编译和运行java文件,网上关于这个的方法大多是通过 javac -cp f ...
- GLib-GObject-WARNING **: Two different plugins tried to register
使用 Ubuntu vivid 的 glib-2.44.1 的程序总是打印类似这种警告: GLib-GObject-WARNING **: Two different plugins tried to ...
- 【Mongodb教程 第十二课 】PHP mongodb 的使用
mongodb 不用过多的介绍了,NOSQL的一种,是一个面向文档的数据库,以其方便灵活的数据结构,对于开发者来说是比较友好的,同时查询的速度也是比较快的,现在好多网站 开始使用mongodb ,具体 ...
- Intel为Google的物联网平台Brillo推出开发板Edison
Brillo* is a solution from Google* for building connected devices. Incorporating aspects of the Andr ...
- 【php】在Windows2003下的IIS配置php5.4
本文与<[php]在Windows2003下配置Apache2.4与php5.4>(点击打开链接)为姊妹篇,仅仅是php所用的server有点不同,这里一个是Apache2.4,一个是Wi ...