阿里云(域名解析) 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地址的项目就可以了。

相关推荐
人工干智能3 小时前
科普:你的笔记本电脑中有三个IP:127.0.0.1、无线网 IP 和局域网 IP;两个域名:localhost和host.docker.internal
网络协议·tcp/ip·电脑
anddddoooo7 小时前
域内证书维权
服务器·网络·网络协议·安全·网络安全·https·ssl
mit6.8247 小时前
[实现Rpc] 通信-Muduo库的实现 | && 完美转发 | reserve | unique_lock
c++·网络协议·rpc
IsToRestart8 小时前
什么是RPC,和HTTP有什么区别?
网络协议·http·rpc
okok__TXF8 小时前
Rpc导读
网络·网络协议·rpc
Nerd Nirvana8 小时前
OpenSSL crt & key (生成一套用于TLS双向认证的证书密钥)
linux·ssl·shell·认证·加密·tls·oepnssl
猫猫的小茶馆9 小时前
【网络编程】UDP协议
linux·服务器·网络·网络协议·ubuntu·udp
r_martian11 小时前
RPC:分布式系统的通信桥梁
网络·网络协议·rpc
KeLin&11 小时前
ESP32 websocket-client
网络·websocket·网络协议
科技小E12 小时前
EasyRTC:基于WebRTC与P2P技术,开启智能硬件音视频交互的全新时代
网络·网络协议·小程序·webrtc·p2p·智能硬件·视频监控