共计 913 个字符,预计需要花费 3 分钟才能阅读完成。
本方原创为:https://winqi.cn,现借鉴留存!谢谢 @paul(王天良)
准备工作:
- 确定服务器为 Centos7.X 系统。(因为小编服务器是线上运行的服务器为 7.5,原创作者 7.4 测试通过,7.X 系统以下未测试!)
- 服务器环境为宝塔。(如果是新安装系统移步宝塔官网:https://www.bt.cn)
- WEB 软件为 Nginx1.15(必须编译安装,有以前安装宝塔有可能 1.15 配置好 ssl1.3 检测依然不是 )
- 服务器可以 SSH 连接。(这个不用说了吧)
第一步:更新 OpenSSL
1. 从官网下载更新包
wget https://www.openssl.org/source/openssl-1.1.1.tar.gz -O openssl.tar.gz
2. 解压,并打 TLS1.3 补丁
tar zxvf openssl.tar.gz
mv openssl-1.1.1 openssl
cd openssl
curl https://raw.githubusercontent.com/hakasenyang/openssl-patch/master/openssl-equal-1.1.1_ciphers.patch | patch -p1
curl https://raw.githubusercontent.com/hakasenyang/openssl-patch/master/openssl-ignore_log_strict-sni.patch | patch -p1
以上步骤过后检验一下
openssl ciphers -V tls1_3 | column -t
// 检测到如下结果(忽略)Error in cipher list
140566266693520:error:1410D0B9:SSL routines:SSL_CTX_set_cipher_list:no cipher match:ssl_lib.c:1383:
更改网站配置
再通过 https://myssl.com 检测
如果要让评级成为 A+, 请修改 nginx 的配置, 增加:add_header Strict-Transport-Security "max-age=31536000";
微信打赏
支付宝打赏
正文完