[DDNS][SSL][HTTPS]阿里云ACME Ubuntu22.04Server 安装教程

1. ACME下载与安装

bash 复制代码
git clone https://gitee.com/neilpang/acme.sh.git
cd acme.sh
./acme.sh --install -m my@example.com

安装成功之后执行crontab -l可以看到其定期任务

如果你要是用standalone mode请提前安装socat。这里介绍的是DNS方式

2. 阿里云访问控制

进入阿里云RAM访问控制获取Access Key和Access Sevret

之后执行:

bash 复制代码
export Ali_Key="xxx" && export Ali_Secret="xxx"

3. 获取证书

先进入主目录

bash 复制代码
cd ~/.acme.sh

在执行

bash 复制代码
 ./acme.sh --issue --dns dns_ali -d "example.com" -d "*.example.com"

出现以下代码表示成功

之后拷贝到我们需要的目录里面去(不能使用~操作符)

bash 复制代码
./acme.sh --install-cert -d "example.com" -d "*.example.com" \
--key-file "/home/vernon/cert_files/com.example.key" \
--cert-file "/home/vernon/cert_files/com.example.crt"  \
--ca-file "/home/vernon/cert_files/ca.crt" \
--fullchain-file "/home/vernon/cert_files/fullchain.cer" #\
# --reloadcmd "service nginx force-reload" # 这个我这里不需要重载服务

4. 更新证书

证书会自动更新,这里是手动的方式

后续更新acme.sh方法

bash 复制代码
./acme.sh --upgrade

L. 参考

https://blog.csdn.net/sedbz/article/details/123566874

https://blog.csdn.net/qq_22903531/article/details/129078126

相关推荐
希望永不加班1 小时前
SpringBoot 安全加固:HTTPS 配置与 HTTP/2
网络·网络协议·安全·http·https
草根站起来1 天前
GeoTrust G2 TLS CN RSA4096 SHA256 2022 CA1
ssl
code_li1 天前
阿里云 OSS(对象存储)接入 Cloudflare 回源流量全免,每月 1 亿次免费请求
阿里云·云计算
圆山猫2 天前
[Linux] Ubuntu 26.04 换阿里云镜像源(最新方法)
linux·ubuntu·阿里云
阿里-于怀2 天前
【无标题】阿里云 AI 网关支持 DeepSeek V4
人工智能·阿里云·云计算·deepseek
新知图书2 天前
通过阿里云百炼平台调用DeepSeek大模型
人工智能·阿里云·云计算·langchian
游戏开发爱好者82 天前
深入理解iOSTime Profiler:提升iOS应用性能的关键工具
android·ios·小程序·https·uni-app·iphone·webview
MY_TEUCK3 天前
【阿里云】阿里云 OSS 图片上传实战与避坑:一次环境变量覆盖引发的排查复盘
阿里云·云计算
困惑阿三3 天前
Nginx 域名绑定与 HTTPS 配置指南
运维·nginx·https·ssl