文档:https://github.com/acmesh-official/acme.sh/wiki/%E8%AF%B4%E6%98%8E

yum install certbot

Letsencrypt
./certbot-auto certonly --email baddl1992@126.com --preferred-challenges dns --manual -d firerise.com.cn -d *.firerise.com.cn --server https://acme-v02.api.letsencrypt.org/directory

certbot certonly --webroot -w /home/wwwroot/blog -d www.firerise.com.cn --agree-tos --email 2432302401@qq.com







#!/bin/bash

# 续签
certbot renew

# 平滑重启nginx
systemctl reload nginx
server {
     listen 443 ssl;
     server_name www.example.com;

     # 有些浏览器本地无CA证书,部署全证书链更好
     ssl_certificate /root/.acme.sh/www.example.com_ecc/fullchain.cer;
     ssl_certificate_key /root/.acme.sh/www.example.com_ecc/www.example.com.key;
     ssl_session_cache shared:SSL:1m;
     ssl_session_timeout 5m;
     # 加密方式
     ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4:!DH:!DHE;

     ssl_prefer_server_ciphers on;
     # 版本需要支持TLSv1.2
     ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

配置完后,在以下链接进行域名检测,检测结果需要至少A级,否则小程序访问不了 https://myssl.com/