Attempting to renew cert ドメイン名) from /etc/letsencrypt/renewal/ドメイン名.conf produced an unexpected error: Missing command line flag or config entry for this setting:

Let's EncryptのSSL更新をしようとしたらエラーがでてました

certbot-auto renewでエラー

certbot-auto renewコマンドをいれたら下記のようなエラーがでました

[c] Attempting to renew cert (wonder-product.jp) from /etc/letsencrypt/renewal/wonder-product.jp.conf produced an unexpected error: Missing command line flag or config entry for this setting: Select the webroot for wonder-product.jp: Choices: ['Enter a new webroot', '/var/vhost/wonder-product/html'] (You can set this with the --webroot-path flag). Skipping. The following certs could not be renewed: /etc/letsencrypt/live/wonder-product.jp/fullchain.pem (failure) [/c]

全然更新できなくて困りました。nginxの場合はcertbot renewでLet’s Encrypt の更新エラーが出たので対応しましたの記事などを見ればよいですが、残念ながらこのサイトはnginxではないため、使えませんでした。openlitespeedなのですよね今回。。。

[[webroot_map]]が空

[c] cat /etc/letsencrypt/renewal/wonder-product.jp.conf [[webroot_map]] [/c]

となっていました。本来ここはドキュメントルートが入るはずなので追加します

[c] cat /etc/letsencrypt/renewal/wonder-product.jp.conf [[webroot_map]] wonder-product.jp = /var/vhost/wonder-product/html www.wonder-product.jp = /var/vhost/wonder-product/html [/c]

これでOKです。後はcertbot-auto renewコマンドをいれる事で更新ができます