美文网首页
使用Certbot自动生成和更新证书

使用Certbot自动生成和更新证书

作者: 终可见丶 | 来源:发表于2023-12-21 14:04 被阅读0次
  1. 安装certbot
    apt install certbot

  2. 安装cerbot-aliyun-dns插件(还有多种可选)
    地址:https://github.com/tengattack/certbot-dns-aliyun

  3. 创建阿里云的子账号并仅授权域名管理权限
    阿里云控制台搜索访问控制,新建用户


    进入访问控制

    添加权限时候选择管理云解析权限


    授权云解析权限
  4. 保存key和secret
    编辑文件vim /etc/letseccrypt/dns-aliyun/credentials.ini复制粘贴以下内容,把key和secret改成自己的

dns_aliyun_access_key = aliyun_key
dns_aliyun_access_key_secret = aliyun_secret

按下ESC,:wq保存退出

  1. 申请证书
    certbot certonly -d "xxx.example.com" --authenticator=dns-aliyun --dns-aliyun-credentials='/etc/letsencrypt/dns-aliyun/credentials.ini'
    输入邮箱,同意协议,第二个接收广告信息的邮件询问可以拒绝
    申请证书截图

相关文章

网友评论

      本文标题:使用Certbot自动生成和更新证书

      本文链接:https://www.haomeiwen.com/subject/avbtndtx.html