开始Nginx的SSL模块
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时提示错误
原因也很简单,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; |
开始Nginx的SSL模块的更多相关文章
- Nginx使用SSL模块配置https
背景 开发微信小程序,需要https域名,因此使用Nginx的SSL模块配置https 步骤 一.去域名管理商(如腾讯云.阿里云等)申请CA证书 二.在Nginx中配置,一般情况下域名管理商会提供配置 ...
- nginx使用ssl模块配置支持HTTPS访问
默认情况下ssl模块并未被安装,如果要使用该模块则需要在编译nginx时指定–with-http_ssl_module参数. 需求: 做一个网站域名为 www.localhost.cn 要求通过htt ...
- nginx使用ssl模块配置HTTPS支持
默认情况下ssl模块并未被安装,如果要使用该模块则需要在编译时指定–with-http_ssl_module参数,安装模块依赖于OpenSSL库和一些引用文件,通常这些文件并不在同一个软件包中.通常这 ...
- nginx使用ssl模块配置支持HTTPS访问【解决ssl错误】
默认情况下ssl模块并未被安装,如果要使用该模块则需要在编译nginx时指定–with-http_ssl_module参数. 需求:做一个网站域名为 www.localhost.cn 要求通过http ...
- nginx使用ssl模块配置HTTPS支持 <转>
默认情况下ssl模块并未被安装,如果要使用该模块则需要在编译时指定–with-http_ssl_module参数,安装模块依赖于OpenSSL库和一些引用文件,通常这些文件并不在同一个软件包中.通常这 ...
- openssl安装问题导致nginx添加ssl模块失败
问题:./nginx: undefined symbol: EVP_rc4_hmac_md5 sudo vi /etc/ld.so.conf #把openssl安装路径加入sudo ldconfig ...
- nginx使用ssl模块配置支持HTTPS访问,腾讯云申请免费证书
开始我尝试用 let's encrypt 让http 变 https 官方:https://github.com/certbot/certbot 参考:https://www.cnblogs.com/ ...
- nginx https ssl 设置受信任证书[原创]
1. 安装nginx 支持ssl模块 http://nginx.org/en/docs/configure.html yum -y install openssh openssh-devel (htt ...
- Nginx启动SSL功能,并进行功能优化,你看这个就足够了
一:开始Nginx的SSL模块 1.1 Nginx如果未开启SSL模块,配置Https时提示错误 nginx: [emerg] the "ssl" parameter requir ...
随机推荐
- OC照片选择器MJPhotoBrowser
图片选择器,看cocoachina发现一个有趣的框架,很好用,分享一下,其实做出该功能我之前写过一篇博客,使用转场动画写的,就是图片的手势缩放没写,有兴趣可以看看 效果图: github地址:http ...
- OC转场动画UIViewControllerTransitioningDelegate
该项目一共两个界面,第一个的只有一个SystemAnimationViewController只有UICollecitonView,第二个界面ImgDetailViewController只有一个UI ...
- 爬虫解析库——BeautifulSoup
解析库就是在爬虫时自己制定一个规则,帮助我们抓取想要的内容时用的.常用的解析库有re模块的正则.beautifulsoup.pyquery等等.正则完全可以帮我们匹配到我们想要住区的内容,但正则比较麻 ...
- what's the python之变量、基本数据类型
what's the 变量? Python 中的变量赋值不需要类型声明. 变量在内存中创建,包括变量的标识,名称和数据. 变量在使用前都必须赋值,变量赋值以后该变量才会被创建. 等号(=)用来给变量赋 ...
- 【剑指offer】两个链表的第一个公共结点
一.题目: 输入两个链表,找出它们的第一个公共结点. 二.思路: 思路一:模拟数组,进行两次遍历,时间复杂度O(n2) 思路二:假定 List1长度: a+n List2 长度:b+n, 且 a&l ...
- sap gui 配置
1: sap gui 安全配置 ,在左下角搜索sap gui configuration.
- Spark算子之aggregateByKey详解
一.基本介绍 rdd.aggregateByKey(3, seqFunc, combFunc) 其中第一个函数是初始值 3代表每次分完组之后的每个组的初始值. seqFunc代表combine的聚合逻 ...
- maven配置本地仓库通用
只要在settings.xml文件中指定仓库就可以了,然后复制仓库到任何地方都可以使用,eclipse中指定一个settings.xml就可以了 仓库的位置是.locks所在目录
- 【LeetCode每天一题】Reverse String
Write a function that reverses a string. The input string is given as an array of characters char[]. ...
- [LeetCode] 860. Lemonade Change_Easy tag: Greedy
At a lemonade stand, each lemonade costs $5. Customers are standing in a queue to buy from you, and ...


