阿里云(域名解析) 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 小时前
创客匠人峰会洞察:私域 AI 化重塑知识变现 —— 创始人 IP 的私域增长新引擎
大数据·网络·人工智能·网络协议·tcp/ip·创始人ip·创客匠人
北京盟通科技官方账号12 小时前
Ixxat Mobilizer系列:助力汽车组件的高效下线测试
网络协议·机器人·自动化·汽车·制造
此生只爱蛋12 小时前
【Linux】TCP机制
网络·网络协议·tcp/ip
北京耐用通信13 小时前
为安全加码,为效率提速:耐达讯自动化Ethernet/IP转DeviceNet电力自动化连接的可靠选择
人工智能·物联网·网络协议·自动化·信息与通信
老蒋新思维13 小时前
创客匠人峰会实录:AI 赋能 IP 定位破局 —— 创始人知识变现的差异化增长路径
网络·人工智能·网络协议·tcp/ip·数据挖掘·创始人ip·创客匠人
橘子真甜~14 小时前
C/C++ Linux网络编程11 - 数据加密与https协议
linux·服务器·网络·http·https·密码学·加密解密
韩凡14 小时前
网络协议(浅见)
网络·网络协议
abcefg_h15 小时前
Cookie,Session的介绍和如何保持TCP连接
网络·网络协议·tcp/ip·golang
渡我白衣15 小时前
Select的优化:poll
开发语言·网络·c++·人工智能·网络协议·tcp/ip·网络安全
老蒋新思维17 小时前
创客匠人启示录:组织 AI 化赋能知识变现 —— 创始人 IP 的规模化增长新范式
网络·人工智能·网络协议·tcp/ip·知识付费·创始人ip·创客匠人