用AME获取免费SSL证书
一、 系统更新
# 更新系统 sudo yum update -y# 安装 EPEL 仓库(Certbot 依赖) sudo yum install epel-release -y
二、 安装Certbot客户端
# 安装 Certbot 和 Nginx/Apache 插件(根据你的 Web 服务器选择) sudo yum install certbot python3-certbot-nginx -y # 使用 Nginx # 或 sudo yum install certbot python3-certbot-apache -y # 使用 Apache
三、 申请证书
//standalone方式申请证书 sudo certbot certonly --standalone -d hgnet.tech -d www.hgnet.tech -m willhuo@outlook.com//检查证书 sudo certbot certificates//测试证书续期(需要关闭nginx) sudo certbot renew --dry-run证书续期(需要关闭nginx) sudo certbot renew --quit//webroot方式申请SSL sudo certbot certonly --webroot -w /home/www.hgnet.tech/public -d hgnet.tech -d www.hgnet.tech -m willhuo@outlook.com//证书删除 sudo certbot delete --cert-name hgnet.techcrontab配置 # 每隔 10 天的凌晨 3 点运行续期 0 3 */10 * * /usr/bin/certbot renew --quiet
四、具体可参考官网进行配置
Let's Encrypt