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. ArrayBlockingQueue的poll方法底层原理

    一.ArrayBlockingQueue的poll方法底层原理 ArrayBlockingQueue 是 Java 并发包 (java.util.concurrent) 中的一个基于数组实现的有界阻塞 ...

  2. kette介绍-Step之Table input

    表输入(Table Input)介绍: Table input用于将数据源的数据加载到Kettle转换中的行集,可以说是数 据从持久化到内存的一种加载变换,故名为输入.加载内部过程,就是通过JDBC ...

  3. mysql重新设置密码、远程登录及中文乱码修改

    基础环境 版本:mysql 5.7.33 系统:ubuntun0.18.04 一.忘记密码问题 1.编辑配置文件/etc/mysql/mysql.conf.d/mysqld.cnf,注意此为ubunt ...

  4. CTF实验吧:登陆一下? 不一样的SQL注入

    http://ctf5.shiyanbar.com/web/wonderkun/web/index.html 发现 过滤了很多SQL敏感字符,并且 转码绕过也并不行 发现'和=没有进行过滤 考虑万能密 ...

  5. 代码随想录第二十三天 | Leecode 39. 组合总和、40.组合总和II、131. 分割回文串

    Leecode 39. 组合总和 题目描述 给你一个 无重复元素 的整数数组 candidates 和一个目标整数 target ,找出 candidates 中可以使数字和为目标数 target 的 ...

  6. 【BUG】Linux目录下明明有可执行文件却提示找不到,“No such file or directory”,解决:为64位Ubuntu安装32位程序的运行架构

    问题 我做了如下努力: ls显示:(能够成功显示) 修改文件名:(能够正常复制.修改.移动,并且被复制的仍然不能运行) 调整文件属性,弄成777: cat显示文件.(能够成功显示) root执行文件: ...

  7. 操作系统综合题之“采用短进程优先调度算法(Shortest-Process-First,SPF)和先来先服务调度算法(First-Come,First-Served,FCFS)计算开始运行时间、结束时间、等待时间、周转时间、带权周转时间、平均周转时间”

    一.问题:某系统中有四个进程,他们进入系统的时间和需要服务的时间如题下表所示(表中数值均为十进制) 进程 进入系统的时间 需要服务的时间 P1 0 100 P2 10 60 P3 25 25 P4 3 ...

  8. Go 层级菜单树转 json 处理

    本篇是一个补充知识点, 目的是为了下篇的后台管理系统中, 菜单权限的接口进行铺垫一下. 同时也是做个笔记, 因为在很多地方都会用这种 "树结构" 来实现很多权限, 层级, 菜单的处 ...

  9. C#网络编程(四)----HttpClient

    简介 HttpClient是C#中用于发送/接收HTTP请求的核心类,属于 System.Net.Http 命名空间.它是 .NET 中处理网络通信的现代 API,设计目标是替代早期的 WebClie ...

  10. BootStrap CDN收藏,矢量图标

    <!-- 新 Bootstrap 核心 CSS 文件 --> <link href="https://cdn.staticfile.org/twitter-bootstra ...