
certbot の --standalone オプションを使用して証明書をいくつか作成しましたが、それらを更新したいので、次のコマンドを実行します (更新されるかどうかをテストします)。
sudo certbot renew --dry-run
しかし、いくつかのドメインではエラーが発生します
Attempting to renew cert from /etc/letsencrypt/renewal/example.org.conf produced an unexpected error: Missing command line flag or config entry for this setting:
Select the webroot for example.org:
Choices: ['Enter a new webroot', '/var/www/ellakcy/']
(You can set this with the --webroot-path flag). Skipping.
したがって、実行時に、sudo certbot renew
Web ルート パスを指定せずに証明書を自動更新できるようにする必要があります。
どうすればそれができるのでしょうか?
答え1
これは、/etc/letsencrypt/renewal/example.org.conf
証明書が他のドメインにも適用されるため、他のドメインに対しても正しい Web ルートを指定する必要があるために/etc/letsencrypt/renewal/example.org.conf
発生します[[webroot_map]]
。
他のドメインに適用する自分のドメインについては、次のようにellak.org.cy
指定しました。
[renewalparams]
authenticator = webroot
installer = None
account=^an_account_hash^
[[webroot_map]]
ellak.org = /var/www/ellak.org/
www.ellak.org=/var/www/ellak.org
ellak.org.cy = /var/www/ellakcy/
www.ellak.org.cy = /var/www/ellakcy/
imap.ellak.org.cy = /var/www/mail_letencrypt/
mail.ellak.org = /var/www/mail_letencrypt/
mail.ellak.org.cy = /var/www/mail_letencrypt/
pop.ellak.org.cy = /var/www/mail_letencrypt/
pop3.ellak.org.cy = /var/www/mail_letencrypt/
smtp.ellak.org.cy = /var/www/mail_letencrypt/
guest8.ellak.gr = /var/www/ellakcy/
したがって、エラーは削除されました。