#关闭防火墙
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(不受信任的证书)的更多相关文章

  1. nginx https ssl 设置受信任证书[转然哥]

    nginx https ssl 设置受信任证书[原创] 1. 安装nginx 支持ssl模块 http://nginx.org/en/docs/configure.html yum -y instal ...

  2. 使用HttpClient发送HTTPS请求以及配置Tomcat支持SSL

    这里使用的是HttpComponents-Client-4.1.2 package com.jadyer.util; import java.io.File; import java.io.FileI ...

  3. Chrome:不受信任的证书----openssl签发带Subject Alternative Name的证书

    Chrome下自签名证书提示无效的问题 发现chrome验证证书很严格,必须带有Subject Alternative Name.签发csr时,修改openssl.cnf : vi /etc/ssl/ ...

  4. iOS 中可用的受信任根证书列表

    iOS 中可用的受信任根证书列表 iOS 受信任证书存储区中包含随 iOS 一并预装的受信任根证书. 关于信任和证书 以下所列的各个 iOS 受信任证书存储区均包含三类证书: “可信”的证书用于建立信 ...

  5. IIS6的SSL配置,如何配置SSL到登陆页,如何将SSL证书设置成受信任的证书

    一. 申请证书1. 到受信任的机构申请 略 2. 到自建的证书服务器申请 a. 安装证书服务 通过控制面板中的“添加/删除程序”,选择“添加/删除Windows组件”.在Windows组件向导中找到“ ...

  6. nginx https ssl 设置受信任证书[原创]

    1. 安装nginx 支持ssl模块 http://nginx.org/en/docs/configure.html yum -y install openssh openssh-devel (htt ...

  7. CentOS 6.7 配置nginx支持SSL/https访问

    一.安装必要的包 yum install openssl openssl-devel 二.配置编译参数,增加对SSL的支持 ./configure –with-http_ssl_module 三.修改 ...

  8. iOS 9 中可用的受信任根证书列表

    iOS 受信任证书存储区包含随 iOS 预安装的可信根证书.  https://support.apple.com/zh-cn/HT205205 关于信任和证书 iOS 9 受信任证书存储区包含三类证 ...

  9. dos批量导入不受信任的证书及软件限制策略的应用

    certmgr.exe -add "证书.cer" -s -r localMachine Disallowed 导入授信机构 certmgr -add "证书.cer&q ...

随机推荐

  1. android systemtrace 报错

    折腾了很久,妈的,终于可以跑出来systemtrace了.如果你跟我一样,老是生成trace失败,那么,按我说的啦: 坑就在,你必须选一个路径存放trace.html,你不选一个,他就生成不了. 打开 ...

  2. Java-多线程与单例

    最近在公司写需求时遇到了多线程与单例一同出现的情况. 这个时候想到的就是线程安全以及单例的定义了,虽然单例指的是在内存中它只有一份,但是并不是说就是线程安全的. 所以,我当时就到网上找了关于多线程下单 ...

  3. Spring_依赖注入思想

    Ioc(Inversion of Control) 控制反转,DI(Dependncy Injection)依赖注入,其实是指同一种思想.举例说明: 张三在某公司负责供水问题.有两种形式,第一种老板指 ...

  4. SetConsoleCtrlHandler

    Excerpt: Registering a Control Handler Function   This is an example of the SetConsoleCtrlHandler fu ...

  5. 在iis上部署asp.net mvc2.0

    mvc2.0是vs2010自带的,在开发环境下可以直接部署在iis中.在生产环境下,如果不能找到正确的mvc2.0版本,可以直接把开发环境下的System.Web.Mvc.dll拷贝过去使用. 1,  ...

  6. WPF and Silverlight.ComboBox 如何通过 Binding IsDropDownOpen 实现下拉菜单展开

    In the WPF example the Popup and the ToggleButton (the arrow on the right) are bound with the proper ...

  7. CentOS搭建pptpd服务笔记

    pptpd.rpm 包下载.http://poptop.sourceforge.net/yum/stable/packages/ 参考资料:http://www.oschina.net/questio ...

  8. ffifdyop

    题目地址:http://www.shiyanbar.com/ctf/2036 后台登陆 上来看到这个界面,果断先看一波源代码. 看到是拼接字符串进行sql查询,就想到了注入了. 但是很不幸的是md5( ...

  9. jeakins用户配置

    进入jeakins:系统管理-全局安全设置 如果有多个用户视情况而定进行权限配置

  10. python - web自动化测试 - 元素操作 - 鼠标键盘

    # -*- coding:utf-8 -*- ''' @project: web学习 @author: Jimmy @file: 鼠标操作.py @ide: PyCharm Community Edi ...