配置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 ...
随机推荐
- android IPC 进程间通讯
参考资料: http://blog.csdn.net/birdsaction/article/details/39451849 在这里我说一下学习技术的方法,别人的博客,别人的东西,再简单,自己没有写 ...
- PowerDesigner常用功能总结
1.PowerDesigner设计表时显示注释列Comment 选中准备编辑的表,[右键]->[Properties]->[Columns]->[Customize Columns ...
- webdriver--单选、复选及下拉框的定位
单选radiobutton的操作 两种情况,一种是各个button元素的属性都有唯一定位值,可以直接用属性唯一值定位:另一种就是一组各方面属性值都一样的radiobutton,除了text,可以用组元 ...
- CS231n——图像分类(KNN实现)
图像分类 目标:已有固定的分类标签集合,然后对于输入的图像,从分类标签集合中找出一个分类标签,最后把分类标签分配给该输入图像. 图像分类流程 输入:输入是包含N个图像的集合,每个图像的标签是K ...
- rownum浅谈(一)
只要做web开发,几乎没有不需要分页查询的,在oracle中,rownum就是用来进行处理分页的. 1.rownum是oracle对结果集返回的一个伪列,也就是说是先查询完结果之后再加上的一个虚列,相 ...
- 深入理解css之absolute
在慕课网上看到的张鑫旭大神的视频,做的笔记,以便日后翻看. 绝对定位与float 1.绝对定位和float有一样的特性,都有包裹性,和破坏性. 2.absolute和relative 如果不把他们俩放 ...
- 历届试题 带分数 全排列模板 JAVA
标题:带分数 100 可以表示为带分数的形式:100 = 3 + 69258 / 714 还可以表示为:100 = 82 + 3546 / 197 注意特征:带分数中,数字1~9分别出现且只出现一次( ...
- CodeForces D. Concatenated Multiples
http://codeforces.com/contest/1029/problem/D You are given an array aa, consisting of nn positive in ...
- Charts & canvas & RGBA
Charts & canvas RGBA color let stopFlag = 0; // show Charts const showCharts = (name = "&qu ...
- 获取地址栏参数 - queryString(正则表达式版本)
获取所有query string function queryStringAll() { var reg = /(?:^|&)([^&]+)=([^&]+)(?=&|$ ...