Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4137266
  • 博文数量: 447
  • 博客积分: 1241
  • 博客等级: 中尉
  • 技术积分: 5786
  • 用 户 组: 普通用户
  • 注册时间: 2011-01-27 06:48
个人简介

读好书,交益友

文章分类

全部博文(447)

文章存档

2023年(6)

2022年(29)

2021年(49)

2020年(16)

2019年(15)

2018年(23)

2017年(67)

2016年(42)

2015年(51)

2014年(57)

2013年(52)

2012年(35)

2011年(5)

分类: Web开发

2013-10-19 22:10:13

 
先生成网关证书 ,仿照CA模式
在nginx的conf目录下
1 生成私钥,需要密码的
openssl genrsa -des3 -out server.key 1024
2 生成证书请求
openssl req -new -key server.key -out server.csr
3 生成证书
cp server.key server.key.org
openssl rsa -in server.key.org -out server.key
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
配置文件
# HTTPS server

server {
listen 444;
server_name localhost;
ssl on;
ssl_certificate server.crt;
ssl_certificate_key server.key;
ssl_session_timeout 5m;
ssl_protocols SSLv2 SSLv3 TLSv1;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location / {
root html;
index index.html index.htm;
}
阅读(2798) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~