当前位置: 首页 > news >正文

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

http://www.lryc.cn/news/366956.html

相关文章:

  • Web LLM 攻击技术
  • Java等待异步线程池跑完再执行指定方法的三种方式(condition、CountDownLatch、CyclicBarrier)
  • 秒杀优化+秒杀安全
  • 48、Flink 的 Data Source API 详解
  • 深入解析Java扩展机制:SPI与Spring.factories
  • Vue2之模板语法
  • java基础练习题
  • unity中通过实现底层接口实现非按钮(图片)的事件监听
  • 重庆耶非凡科技有限公司的选品师项目加盟靠谱吗?
  • 《青少年编程与数学》课程方案:4、课程策略
  • 用爬虫实现---模拟填志愿
  • vscode Run Code输出出现中文乱码情况问题解决方案
  • 代码随想录训练营Day30
  • Swift 序列(Sequence)排序面面俱到 - 从过去到现在(二)
  • STM32F103C8T6基于HAL库移植uC/OS-III
  • 微服务学习Day9-分布式事务Seata
  • vue用vite配置代理解决跨域问题(target、rewrite和changeOrigin的使用场景)
  • 为什么PPT录制没有声音 电脑ppt录屏没有声音怎么办
  • JDBC学习笔记(三)高级篇
  • c++编译器在什么情况下会提供类的默认构造函数等,与析构函数
  • SpringBoot3整合Mybatis-Plus3.5.5出现的问题
  • 服务器数据恢复—强制上线raid5阵列离线硬盘导致raid不可用的数据恢复案例
  • 初入阿里云,上手走一波
  • [C++] 小游戏 斗破苍穹 2.2.1至2.11.5所有版本(中) zty出品
  • Javaweb---HTTPS
  • [已解决]ESP32-C3上传程序成功但没有反应的问题
  • 使用 OCLint进行静态代码分析:一个完整的配置示例
  • 【Linux】线程的互斥
  • electron如何让你窗口总是显示在最前面【mac解决全屏窗口alwaysOnTop参数不起作用】
  • XR和Steam VR项目合并问题