問題
手動で certbot の webroot を設定した場合、自動更新の時期になると以下のようなメッセージが出てきて、certbot renew
が走っているにも関わらず証明書が更新されていないことがある。
Failed to renew certificate www.example.com with error: Missing command line flag or config entry for this setting:
Input the webroot for www.example.com:
この対処方法を良く忘れるのでメモ
対処
/etc/letsencrypt/renewal/
以下に証明書ごとに対応した設定ファイルが作られる。
ここで ``[[webroot_map]]` セクションを追加する。 一つの証明書で複数のドメインに対処している場合は複数行書けばOK。
[[webroot_map]]
example.com = <<設定したWebrootの場所>>
www.example.com = <<設定したWebrootの場所>>