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

相关推荐
问道飞鱼16 分钟前
【HTTP知识】HTTP OPTIONS 预检请求深度解析与优化策略
网络·网络协议·http·option·预检
qq_409022953 小时前
计算机网络
网络协议·tcp/ip·信息与通信
锐策4 小时前
深入 RFC 793:TCP 报文头部、MSS 协商与三次握手 / 四次挥手全解析
网络·网络协议·tcp/ip
Strawberry_rabbit6 小时前
程序员工作必需之公网和私网
前端·网络协议
噔噔君7 小时前
嵌入式模组拨号获取IP地址时,设置的ippass是什么原理,起到什么作用?
服务器·网络协议·tcp/ip·ip
SRC_BLUE_177 小时前
NSSCTF - Web | 【SWPUCTF 2021 新生赛】Do_you_know_http
网络·网络协议·http
ehiway8 小时前
国际先进!中科亿海微国产嵌入式FPGA IP核及EDA系统设计技术通过科技成果评价
网络协议·tcp/ip·fpga开发
“αβ”9 小时前
了解“网络协议”
linux·服务器·网络·c++·网络协议·tcp/ip·tcp
小吴-斌12 小时前
本地请求接口报SSL错误解决办法(Could not verify * SSL certificate)
网络·网络协议·ssl
草莓熊Lotso13 小时前
基于容器适配器模式的 Stack 与 Queue 实现:复用底层容器的优雅设计
c++·网络协议·rpc·适配器模式