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

相关推荐

  1. 使用certbot申请https通配符证书阿里篇】

    2024-06-08 20:20:06       63 阅读
  2. 阿里域名配置,且不带端口访问

    2024-06-08 20:20:06       41 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-06-08 20:20:06       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-06-08 20:20:06       100 阅读
  3. 在Django里面运行非项目文件

    2024-06-08 20:20:06       82 阅读
  4. Python语言-面向对象

    2024-06-08 20:20:06       91 阅读

热门阅读

  1. Base64 编码表 参考

    2024-06-08 20:20:06       28 阅读
  2. 【TVM 教程】编译 PyTorch 目标检测模型

    2024-06-08 20:20:06       29 阅读
  3. 引用和指针的区别

    2024-06-08 20:20:06       31 阅读
  4. Python 中如何使用 lambda 函数

    2024-06-08 20:20:06       29 阅读
  5. 二叉树、二叉搜索树、平衡二叉搜索树

    2024-06-08 20:20:06       29 阅读
  6. 【环境搭建】1.阿里云ECS服务器 安装jdk8

    2024-06-08 20:20:06       27 阅读
  7. python 异步编程:协程

    2024-06-08 20:20:06       33 阅读
  8. 为什么会有虚像

    2024-06-08 20:20:06       33 阅读
  9. 翻转二叉树-力扣

    2024-06-08 20:20:06       28 阅读
  10. 对称二叉树-力扣

    2024-06-08 20:20:06       30 阅读
  11. 【进程池与线程池 协程】

    2024-06-08 20:20:06       25 阅读