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. JAVA基础之多线程二期

    一.主线程 public class MainThread { /** * 主线程:指执行main()方法的线程,且该线程是单线程,从上到下执行 * JVM执行main()方法时,JVM会将main( ...

  2. python获取指定文件夹内文件名称

    比如下图,文件夹内有若干文件,且文件夹路径:C:\Users\Administrator\Desktop\2147\1024 4行代码,解决问题 import os path = "C:\\ ...

  3. 使用PyMuPDF对pdf文件插入文字时 遇到配置本地的字体文件缺仍然使用默认Helvetica字体问题

    背景 昨天收到的新需求,一份文件从其他部门发起,进行一些文字填写后盖章,再到我们部门,我们接收到的是pdf文件,所以需要在pdf文件中进行修改,插入当日日期等文字.但有要求字体必须和原文档字体相同. ...

  4. scrcpy - Android手机投屏操作神器

    推荐一个Genymotion推出的投屏工具,跨平台,自定义码率,最重要的是开源,简直良心. Github:https://github.com/Genymobile/scrcpy 下载地址: http ...

  5. pod数据持久化-pv与pvc资源及动态存储StorageClass

    一.pc与pvc的概念 在传统的存储卷挂载,比如说nfs,它虽然能够实现我们大多数的生产场景,但是,耦合性比较高: 举例:假设,我们要将集群从"阿里云"迁移到我们私有云服务器上,并 ...

  6. vue3 基础-API-watch 和 watchEffect

    前篇对 computed 属性如何在 api 中基本使用, 即从 vue 中引入, 然后通过直接传函数或者传对象的方式, 开箱即用, 非常清晰易懂. 本篇继续来对之前的 watch 进行扩展使用啦. ...

  7. 高性能NoSQL

    极客时间:<从 0 开始学架构>:高性能NoSQL 1.引言 关系型数据库凭借着SQL功能和ACID的属性,活跃于各种各样的系统中,但它并不是完美的,其存在以下缺点: 关系数据库存储的是行 ...

  8. github每次提交代码都要登录

    原因:不要使用https的方式克隆代码,而是用git. 查看源 git remote -v 删除源 git remote rm origin 重新添加项目源(origin后面改成自己的): git r ...

  9. 我所理解的 Go 的 CSP 并发控制机制

    你一定听说过 Go 语言所倡导的这个核心并发原则:"不要通过共享内存来通信,而要通过通信来共享内存 (Don't communicate by sharing memory; instead ...

  10. 文艺平衡树FHQ-Treap-指针版

    文艺平衡树FHQ-Treap-指针版 文艺平衡树 FHQ-Treap-指针版 代码存档 AC-C++11 385ms 9.09MB AC-C++11 O2 394ms 9.23MB 貌似这玩意厌氧啊 ...