自建CA证书以及导入到浏览器实现https安全连接

安装 openssl(一般centos 系统都会自带安装好的了) 目录:/etc/pki/CA/ yum install openssl openssl-devel -y mkdir -pv /etc/ssl/private

由于谷歌浏览器对安全比较高要求,所以需要额外配置

[root@localhost data]# vim http.ext keyUsage = nonRepudiation, digitalSignature, keyEncipherment extendedKeyUsage = serverAuth, clientAuth subjectAltName=@SubjectAlternativeName

[ SubjectAlternativeName ] IP.1=127.0.0.1 IP.2=192.168.32.130 #这里要和下面的IP对应一致

使用openssl 生成 SSL key 和 CSR [root@localhost data]# cd /home/data/

[root@localhost data]# openssl req -new -newkey rsa:2048 -sha256 -nodes -out 192.168.32.130.csr -keyout 192.168.32.130.key -subj “/C=CN/ST=Guangdong/L=GZ/O=Super Inc./OU=Web Security/CN=192.168.32.130”

[root@localhost data]# openssl x509 -req -days 3650 -in 192.168.32.130.csr -signkey 192.168.32.130.key -out 192.168.32.130.crt -extfile http.ext

将 192.168.32.130.crt 导入到 chrome 受信任的根证书颁发机构

重载 nginx 并清除 chrome 缓存访问。

Copyright © 2088 欧洲世界杯预选赛_赛程世界杯 - tvzfj.com All Rights Reserved.
友情链接