下文并没有根本上解决端口绑定的问题,只是换了一种获取/更新证书的方式,绕过了端口绑定

环境

  • LNMP
  • certbot
  • Ubuntu 16.04

问题描述

certbot 更新证书,执行

certbot renew --dry-run

后,报错

Encountered exception during recovery: certbot.errors.MisconfigurationError: nginx restart failed:

nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)

nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)

nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)

nginx: [emerg] still could not bind()

Attempting to renew cert (xxx.com) from /etc/letsencrypt/renewal/xxx.com.conf produced an unexpected error: nginx restart failed:

解决 certbot 无法更新证书问题

参考

参考太多了,不整理了

原因

Continue reading “解决 certbot 无法更新证书问题”

准备

  • 域名和VPS

参考

步骤

现在进入Let’s Encrypt的官网,官方已经建议使用certbot来获取证书。

  1. 进入certbot官网,选择对应的软件和操作系统(图为nginx + ubuntu18.04)通过certbot获取Let‘s Encrypt证书
  2. 按照指令安装certbot
  3. 执行指令自动生成并自动配置证书
    sudo certbot --nginx

    如果只想生成证书,之后手动配置,则添加指令certonly

    sudo certbot --nginx certonly
  4. 按照指示填写信息后,certbot会将证书存储在 /etc/letsencrypt/live/[your domain]/