• 使用 Certbot 申请 Let's Encrypt SSL 证书,并定时续期


    网站有个 SSL 证书,可以提高安全性、及提高搜索引擎的排名。
    Let’s Encrypt SSL 证书是免费的,可以用命令行申请,也可以用命令行续期。

    Let’s Encrypt 网站推荐用 cerbot 工具。这个工具软件在不同的年份,有不同的用法(可能是不同软件版本的命令行,参数与之前版本改动较大),网上查到的往往行不通。这篇文章介绍当前版本可用的命令行参数使用方法。

    参考网站:
    https://letsencrypt.org/zh-cn/
    https://certbot.eff.org/instructions

    a. 申请有通配符的域名 SSL 证书:

    certbot certonly -d *.somedomain.com --manual --preferred-challenges dns --server https://acme-v02.api.letsencrypt.org/directory


    根据提示,输入对应的信息。生成证书后,可更改 nginx/apache 对应的配置文件。

    b. 定时运行命令,续期 SSL 证书:

    certbot certonly -d *.somedomain.com --manual --preferred-challenges dns --server https://acme-v02.api.letsencrypt.org/directory


    命令与前一步一样。得到的提示不同,如下:

    What would you like to do?
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    1: Keep the existing certificate for now
    2: Renew & replace the certificate (may be subject to CA rate limits)
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2

    选择 2,进行 SSL 证书续期。续期后的证书,是覆盖原有的。

    -------此博客同时发表于 https://my.oschina.net/jacklondon,https://www.cnblogs.com/jacklondon,https://www.zheguisoft.com/staff_blogs/jacklondon_chen/2022 ,欢迎转载。

  • 相关阅读:
    redis 配置文件
    mysql的join
    mysql在DOS下的操作
    Echart显示在顶端显示总数
    汇编中,BP,SP有何区别?分别怎么使用?
    汇编函数调用中bp和sp是指什么?
    汇编语言中,SP,BP ,SI,DI作用?
    我对读计算机软件专业硕士的几点看法
    磨刀不误砍柴工
    《自己动手写操作系统》读书笔记——初识保护模式
  • 原文地址:https://www.cnblogs.com/jacklondon/p/renew_ssl_certification_by_cerbot.html
Copyright © 2020-2023  润新知