AWS上に、ディスクイメージから作成して動かしているBitnami wordpressのLet’s Encrypt(https化)を更新

sudo ./letsencrypt-auto renew --force-renewal -w /home/bitnami/apps/wordpress/htdocs

で更新が成功し、


sudo /opt/bitnami/ctlscript.sh restart apache

再起動することで、ブラウザから証明書を見た際、更新が確認できた

 

 

※最初、-wオプションを付けずに実行したら、以下のエラーが出てしまった。

Attempting to renew cert from /etc/letsencrypt/renewal/ドメイン.conf produced an unexpected error: Failed authorization procedure. ドメイン (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://ドメイン/.well-known/acme-challenge/U3ZG_cx_F84fETF9ayB0mlEyRZJqPWTTKhUKL2_JZRc: "<!DOCTYPE html>

 

All renewal attempts failed. The following certs could not be renewed:

  /etc/letsencrypt/live/ドメイン/fullchain.pem (failure)

1 renew failure(s), 0 parse failure(s)

 

IMPORTANT NOTES:

 - The following errors were reported by the server:

Domain: ドメイン

Type:   unauthorized

Detail: Invalid response from

http://ドメイン/.well-known/acme-challenge/U3ZG_cx_F84fETF9ayB0mlEyRZJqPWTTKhUKL2_JZRc:

 

To fix these errors, please make sure that your domain name was

   entered correctly and the DNS A record(s) for that domain

   contain(s) the right IP address.

 

 

これは、

teratail.com

こちらが詳しいが、

おそらく、HTTPサーバ(Apache、もしくはnginxなど)で設定したドキュメントルートと、letsenctypt-autoコマンドで指定したドキュメントルートが食い違っているのが原因です。」がまさに自分の場合でも該当したと思われ、-wオプションで、最初に証明書を設定した時と同じ、ドキュメントルートのパス(/home/bitnami/apps/wordpress/htdocs)を入れたらokだった。