我已经使用 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
能够自动更新我的证书,而无需提供 webroot 路径。
我怎样才能做到这一点?
答案1
这是因为/etc/letsencrypt/renewal/example.org.conf
证书也适用于其他域,所以您也需要为其他域指定正确的/etc/letsencrypt/renewal/example.org.conf
webroot [[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/
因此错误已被消除。