Linux升级openssl版本、安装nginx并配置https证书支持TLSv1.3
以下内容为自己总结的经验,如有错误欢迎指正,希望能让大家少踩坑,不喜勿喷
第一步:openssl版本检查
//检查openssl版本,如果版本为1.0.1,为了支持TLSv1.3建议升级到1.1.1版本
> openssl version
参考文章
https://blog.csdn.net/weixin_43153854/article/details/109823633?utm_medium=distribute.pc_relevant.none-task-blog-2defaultbaidujs_baidulandingword~default-4-109823633-blog-106643510.pc_relevant_default_base2&spm=1001.2101.3001.4242.3&utm_relevant_index=7
第二步:安装Nginx
很全的一篇Nginx安装讲解,下面放链接:
参考文章
https://blog.csdn.net/t8116189520/article/details/81909574
第三步:配置证书(证书文件需自行下载)
server {
listen 443 ssl;
server_name (域名) (IP);
#https证书文件
ssl_certificate /usr/local/nginx/conf/cert/7602222_xxx.pem;
ssl_certificate_key /usr/local/nginx/conf/cert/7602222_xxx.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_prefer_server_ciphers on;
location / {
root /usr/local/nginx/html;
index index.html index.htm;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 1000m;
}
********(其他location省略)
}