阿里云(域名解析) certbot 证书配置

1、安装 certbot

ubuntu 系统:

复制代码
sudo apt install certbot

2、申请certbot 域名证书,如申请二级域名aa.example.com 的ssl证书,同时需要让 bb.aa.example.com 也可以使用此证书

1、命令:sudo certbot certonly -d "域名" -d "*.域名" --manual --preferred-challenges dns --server https://acme-v02.api.letsencrypt.org/directory

复制代码
sudo certbot certonly -d "aa.example.com" -d "*.aa.example.com" --manual --preferred-challenges dns --server https://acme-v02.api.letsencrypt.org/directory

2、执行命令后,一直 enter 直到,出现如下结果,此时需要登录阿里云配置域名解析。

复制代码
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Press Enter to Continue

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please deploy a DNS TXT record under the name:

_acme-challenge.aa.example.com.

with the following value:

n_5qYQgAiczCZmFbq7u

(This must be set up in addition to the previous challenges; do not remove,
replace, or undo the previous challenge tasks yet. Note that you might be
asked to create multiple distinct TXT records with the same name. This is
permitted by DNS standards.)

3、阿里云配置,需要等一下DNS 解析。

1、配置域名SSL解析

2、配置域名-IP解析(项目使用的域名)

图片如下:

4、回到:ubuntu,继续下一步,enter,成功如下:

复制代码
Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/file.data-flop.com/fullchain.pem
Key is saved at:         /etc/letsencrypt/live/file.data-flop.com/privkey.pem
This certificate expires on 2024-0*-0*.
These files will be updated when the certificate renews.

4、使用SSL证书:

1、上面图片已经为我们创建了一个 bb.aa.example.com 的指向192.168.0.1 的IP地址。

2、进入/etc/letsencrypt/live/file.data-flop.com/,拿到ssl证书文件,配置到192.168.0.1地址的项目就可以了。

相关推荐
运维儿8 分钟前
2.二层网络为什么存在冲突?如何解决冲突和冲突域?
网络·网络协议·linux 网络·云计算网络
hzxpaipai23 分钟前
2026 杭州外贸网站制作公司哪家好?派迪科技确实有点技术
前端·科技·网络协议·网络安全
上海云盾-小余32 分钟前
服务器被入侵后如何快速止损?从排查到加固的应急处置全流程
网络·网络协议·tcp/ip·安全·web安全
北京耐用通信33 分钟前
1个网关=100+设备兼容:耐达讯自动化CC-Link IE 转 EtherCAT重新定义工业协议转换价值
人工智能·科技·网络协议·自动化·信息与通信
AugustRed1 小时前
AI流式输出方案SSE vs WebSocket对比
人工智能·websocket·网络协议
西西弟1 小时前
网络编程基础之TCP基本通信
服务器·网络·网络协议·tcp/ip
AscendKing2 小时前
一款开源、本地部署的 SSL 证书自动化管理工具Certimate介绍 部署教程
开源·自动化·ssl
MonkeyKing_sunyuhua2 小时前
Nginx + Let’s Encrypt 免费 SSL 证书 的完整配置过程
运维·nginx·ssl
Lsir10110_2 小时前
吃透 TCP 核心原理:从握手挥手到滑动窗口与拥塞控制
网络·网络协议·tcp/ip
情绪雪3 小时前
TCP/IP 模型
网络·网络协议·tcp/ip