配置OpenResty支持SSL(不受信任的证书)
#关闭防火墙
chkconfig iptables off
service iptables stop #关闭SELINUX
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
setenforce #上传openresty_auto_install到 /usr/local/software
mkdir /usr/local/software cd /usr/local/software/openresty_auto_install #更新包
yum update -y
yum install -y ghostscript unzip wget gcc gcc-c++ cmake make gcc-g77 autoconf automake zlib* fiex* libxml* ncurses-devel libmcrypt* libtool-ltdl-devel* make cmake perl bison ntpdate readline-devel pcre-devel openssl-devel tcl perl make g++ libtool autoconf automake imake mysql-devel libxml2-devel expat-devel #调对时钟
ntpdate stdtime.gov.hk
ntpdate cn.pool.ntp.org tar zxvf ngx_openresty-1.7.7.1.tar.gz
cd ngx_openresty-1.7.7.1
./configure --prefix=/usr/local/openresty --with-http_stub_status_module --with-http_gzip_static_module --with-luajit --with-http_ssl_module make && make install \cp /usr/local/software/openresty_auto_install/nginx /etc/rc.d/init.d/nginx
chmod /etc/rc.d/init.d/nginx
chkconfig nginx on #配置conf
vi /usr/local/openresty/nginx/conf/nginx.conf server { listen ;
ssl on;
ssl_certificate /usr/local/openresty/nginx/conf/server.crt;
ssl_certificate_key /usr/local/openresty/nginx/conf/server_nopwd.key;
} #cd到目录
cd /usr/local/openresty/nginx/conf cd到目录 #cd /usr/local/nginx/conf 创建服务器私钥
openssl genrsa -des3 -out server.key 签名请求的证书
openssl req -new -key server.key -out server.csr 注意此步骤过程中需要填写一系列的东西(公司名称、所在地等按照实际情况填)
尤其注意 your server' hostname的填写,如果没有域名就直接填ip,如果有域名就填域名(都不需要端口号) 例如: 直接填ip: 61.155.86.78 域名: api.trewanyg.com 模糊域名: * .trewanyg.com 制作解密后的私钥
openssl rsa -in server.key -out server_nopwd.key
openssl x509 -req -days -in server.csr -signkey server_nopwd.key -out server.crt 拷贝证书文件 cp /usr/local/openresty/nginx/conf/server.crt /usr/local/openresty/nginx/html/ 进入nginx的sbin目录,启动nginx
service nginx restart 进入nginx主页查看
https://10.10.6.213
http://www.cnblogs.com/yun007/p/3739182.html
配置OpenResty支持SSL(不受信任的证书)的更多相关文章
- nginx https ssl 设置受信任证书[转然哥]
nginx https ssl 设置受信任证书[原创] 1. 安装nginx 支持ssl模块 http://nginx.org/en/docs/configure.html yum -y instal ...
- 使用HttpClient发送HTTPS请求以及配置Tomcat支持SSL
这里使用的是HttpComponents-Client-4.1.2 package com.jadyer.util; import java.io.File; import java.io.FileI ...
- Chrome:不受信任的证书----openssl签发带Subject Alternative Name的证书
Chrome下自签名证书提示无效的问题 发现chrome验证证书很严格,必须带有Subject Alternative Name.签发csr时,修改openssl.cnf : vi /etc/ssl/ ...
- iOS 中可用的受信任根证书列表
iOS 中可用的受信任根证书列表 iOS 受信任证书存储区中包含随 iOS 一并预装的受信任根证书. 关于信任和证书 以下所列的各个 iOS 受信任证书存储区均包含三类证书: “可信”的证书用于建立信 ...
- IIS6的SSL配置,如何配置SSL到登陆页,如何将SSL证书设置成受信任的证书
一. 申请证书1. 到受信任的机构申请 略 2. 到自建的证书服务器申请 a. 安装证书服务 通过控制面板中的“添加/删除程序”,选择“添加/删除Windows组件”.在Windows组件向导中找到“ ...
- nginx https ssl 设置受信任证书[原创]
1. 安装nginx 支持ssl模块 http://nginx.org/en/docs/configure.html yum -y install openssh openssh-devel (htt ...
- CentOS 6.7 配置nginx支持SSL/https访问
一.安装必要的包 yum install openssl openssl-devel 二.配置编译参数,增加对SSL的支持 ./configure –with-http_ssl_module 三.修改 ...
- iOS 9 中可用的受信任根证书列表
iOS 受信任证书存储区包含随 iOS 预安装的可信根证书. https://support.apple.com/zh-cn/HT205205 关于信任和证书 iOS 9 受信任证书存储区包含三类证 ...
- dos批量导入不受信任的证书及软件限制策略的应用
certmgr.exe -add "证书.cer" -s -r localMachine Disallowed 导入授信机构 certmgr -add "证书.cer&q ...
随机推荐
- HDU 4576 Robot(概率dp)
Robot Time Limit: 8000/4000 MS (Java/Others) Memory Limit: 102400/102400 K (Java/Others)Total Sub ...
- 5.bootstrap栅格 清除浮动
只要用到栅格,就注意要清除浮动,清除方法就是在父元素的class上加一个clearfix 1.情景: . <div class="col-sm-7"> <div ...
- 实际遭遇GC回收造成的Web服务器CPU跑高
今天下午有段时间访问园子感觉不如以前那么快的流畅,上Web服务器一看,果然,负载均衡中的1台云服务器CPU跑高. 上图中红色曲线表示的是CPU占用率.正常情况下,CPU占用率一般在40%以下. 这台云 ...
- python学习笔记二:流程控制
一.if else: #!/usr/bin/python x = int(raw_input('please input:')) if x >= 90: if x >= 95: print ...
- 【Luogu P2257】YY 的 GCD
题目 求: \[ \sum_{i = 1}^n \sum_{j = 1}^m [\gcd(i, j) \in \mathbb P] \] 有 \(T\) 组数据, \(T\le 10^4, n, m\ ...
- python练习1 ——菱形打印
具体请看链接: 链接 2018-09-29 12:51:45
- katalon系列一:初识Katalon Studio自动化测试工具
最近准备把公司的系统搞上UI自动化,先是自己用Python+selenium+pytest写了一个框架,开始写case的时候发现效率极其慢.原因为: (1)开发为提高前端响应时间,使用前端路由技术,一 ...
- [转]unity之LOD
LOD技术有点类似于Mipmap技术,不同的是,LOD是对模型建立了一个模型金字塔,根据摄像机距离对象的远近,选择使用不同精度的模型. 它的好处是可以在适当的时候大量减少需要绘制的顶点数目. 它的缺点 ...
- Python网络编程(OSI模型、网络协议、TCP)
前言: 什么是网络? 网络是由节点和连线构成,表示诸多对象及其相互联系. 在数学上,网络是一种图,一般认为专指加权图. 网络除了数学定义外,还有具体的物理含义,即网络是从某种相同类 型的实际问题中抽象 ...
- 孤荷凌寒自学python第十一天初识Python的字典类
孤荷凌寒自学python第十一天初识Python的字典类 (完整学习过程屏幕记录视频地址在文末,手写笔记在文末) Python的字典其实是一张二维对照表 下面举例说明: 键名Key 姓名 性别 身高 ...