Certbot 使用自動提供的 Webroot 更新證書

Certbot 使用自動提供的 Webroot 更新證書

我已經使用 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.confWebroot [[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/

所以錯誤已刪除。

相關內容