1. 安装Certbot

sudo apt install certbot -y

certbot --version
certbot 2.9.0

2. 域名验证

泛域名的验证采用DNS01的验证方式,通过在域名DNS记录中添加特定TXT记录(如_acme-challenge)完成验证。

certbot certonly --manual --preferred-challenges dns \
-d "*.zenseek.site" -d "zenseek.site" --email brain_07@163.com --agree-tos Saving debug log to /var/log/letsencrypt/letsencrypt.log
Requesting a certificate for *.zenseek.site and zenseek.site - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please deploy a DNS TXT record under the name: _acme-challenge.zenseek.site. with the following value: Za59txFdRj3s0I3v_fFxCy7jRN1erVai9j3285XXXXX - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Press Enter to Continue

从其他的Linux Terminal来验证DNS的TXT解析是否成功。能看见解析出来的字符串和Certbot给的一样就算是成功了。

dig TXT _acme-challenge.zenseek.site +short
"Za59txFdRj3s0I3v_fFxCy7jRN1erVai9j3285XXXXX"

这时我们按回车键,会继续验证一遍。提示特意强调不要删除之前的challenge。同一个名的记录可以对应两个TXT值。

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please deploy a DNS TXT record under the name: _acme-challenge.zenseek.site. with the following value: 71QWlJFQnx-KseIECTqhPCbisU2b2wbq9rWre3XXXXX (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.) Before continuing, verify the TXT record has been deployed. Depending on the DNS
provider, this may take some time, from a few seconds to multiple minutes. You can
check if it has finished deploying with aid of online tools, such as the Google
Admin Toolbox: https://toolbox.googleapps.com/apps/dig/#TXT/_acme-challenge.zenseek.site.
Look for one or more bolded line(s) below the line ';ANSWER'. It should show the
value(s) you've just added. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Press Enter to Continue

我们在dig一遍,有时候发现会有两个值。

dig TXT _acme-challenge.zenseek.site +short
"71QWlJFQnx-KseIECTqhPCbisU2b2wbq9rWre3XXXXX"
"Za59txFdRj3s0I3v_fFxCy7jRN1erVai9j3285XXXXX"

3. 取得域名

这时我们再次按下回车键,就会提示你的证书生成成功了。

Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/zenseek.site/fullchain.pem
Key is saved at: /etc/letsencrypt/live/zenseek.site/privkey.pem
This certificate expires on 2025-10-03.
These files will be updated when the certificate renews. NEXT STEPS:
- This certificate will not be renewed automatically. Autorenewal of --manual certificates requires the use of an authentication hook script (--manual-auth-hook) but one was not provided. To renew this certificate, repeat this same certbot command before the certificate's expiry date. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you like Certbot, please consider supporting our work by:
* Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
* Donating to EFF: https://eff.org/donate-le
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

再之后,就可以把证书挂到Nginx下了。

本文摘之我的博客 一只空杯

Ubuntu使用Certbot生成泛域名解析证书的更多相关文章

  1. let's encrypt部署免费泛域名证书

    环境说明 [root@localhost ~]# cat /etc/redhat-release CentOS Linux release 7.5.1804 (Core) [root@localhos ...

  2. [新手教程]申请https泛域名解析

    前置准备 教程开始,我们默认相信小伙伴们对基本的域名购买及解析有了一定的认识和实践 一个正常的域名 一台公网服务器 域名解析操作 如:现在我们要设置frps的泛域名解析 设置二级域名 frp.xx.c ...

  3. nginx用Certbot配置免费SSL证书(ngx_http_ssl_module模块)

    一.准备工作 1.先安装nginx https://files.cnblogs.com/files/blogs/676936/nginx-1.18.0.sh #nginx-1.18.0版安装脚本2.在 ...

  4. 基于Let's Encrypt生成免费证书-支持多域名泛域名证书

    目录 客户端 certbot acme.sh 安装acme.sh 1. 自动安装 2. 手动安装 3. 测试收否安装成功 使用acme.sh生成证书 1. HTTP 方式 2. DNS 方式 1. 生 ...

  5. 使用 certbot 申请泛域名https证书

    使用 certbot 申请泛域名https证书 Intro Certbot 是一个基于 Let's Encrypt 的自动化申请证书的工具,支持的系统和web server也很多,详见 Certbot ...

  6. 使用Let's Encrypt生成免费SSL证书操作记录

    最近要做微信小程序,要求接口必须备案且是https,个人小站就直接准备使用免费的SSL证书,网上搜了一圈,发现Let's Encrypt是浏览器支持比较好的. 流程: 1. 首先去服务器上安装了Let ...

  7. CentOS 7配置Let’s Encrypt支持免费泛域名证书

    Let’s Encrypt从2018年开始支持泛域名证书,有效期3个月,目前仅支持acme方式申请,暂不支持certbot. 1.安装acme.sh curl https://get.acme.sh ...

  8. 申请 Let’s Encrypt 泛域名证书 及 Nginx/Apache 证书配置

    什么是 Let’s Encrypt? 部署 HTTPS 网站的时候需要证书,证书由 CA (Certificate Authority )机构签发,大部分传统 CA 机构签发证书是需要收费的,这不利于 ...

  9. Let's Encrypt免费泛域名证书申请

    一. 下载acme.sh,以下四条命令任选一条即可 curl https://get.acme.sh | shwget -O - https://get.acme.sh | sh curl https ...

  10. 使用cfssl生成自签证书

    安装ssl wget https://pkg.cfssl.org/R1.2/cfssl_linux-amd64 wget https://pkg.cfssl.org/R1.2/cfssljson_li ...

随机推荐

  1. apk签名问题

    https://www.jianshu.com/p/0bd7b6d6e068 https://blog.51cto.com/u_15520037/5703487

  2. 🎀SpringBoot项目打包jar 并打包为exe启动

    简介 将SpringBoot项目打包jar并打包为exe启动,在无jdk环境下直接运行. 操作 SpringBoot打包为可执行jar(这里使用maven install) 注:如果存在前端页面需同时 ...

  3. 37.1K star!MCP爆火后,这个AI模型全能工具箱开源项目让智能体开发更简单!

    嗨,大家好,我是小华同学,关注我们获得"最新.最全.最优质"开源项目和高效工作学习方法 "Awesome MCP Servers 是当前最全面的模型上下文协议服务器集合, ...

  4. Java5新特性--可变参数

    可变参数 public class Test01 { public static void main(String[] args) { System.out.println(add(123)); Sy ...

  5. 代理模式-Proxy(动态代理)

    代理模式(Proxy) 一.作用 又叫"动态代理" 为其他对象提供一种代理以控制对这个对象的访问 二.结构图 三.场景1 远程代理: 也就是为一个对象在不同的地址空间提供局部代表. ...

  6. MySQL高可用搭建方案之MHA

    MHA架构介绍 MHA是Master High Availability的缩写,它是目前MySQL高可用方面的一个相对成熟的解决方案,其核心是使用perl语言编写的一组脚本,是一套优秀的作为MySQL ...

  7. AI编译器及TVM整体架构

    虽然之前也依据tvm官方文档写过一篇关于TVM架构的博客,但总感觉属于一种身在此山中的感觉(偏向于TVM实现的各个模块),并没有一览众山小的即视感(对框架的整体理解). 因此,今天再次请求出战... ...

  8. dll正由另一进程使用,因此该进程无法访问此文件

    打开 Windows 资源监视器:按下 Win+R 快捷键打开"运行"对话框,输入 resmon 命令并按下回车键.在资源监视器中,选择"CPU"选项卡,然后在 ...

  9. codeup之分数序列求和

    Description 有如下分数序列 求出次数列的前20项之和. 请将结果的数据类型定义为double类型. Input 无 Output 小数点后保留6位小数,末尾输出换行. Sample Inp ...

  10. 第9讲、深入理解Scaled Dot-Product Attention

    Scaled Dot-Product Attention是Transformer架构的核心组件,也是现代深度学习中最重要的注意力机制之一.本文将从原理.实现和应用三个方面深入剖析这一机制. 1. 基本 ...