起票日:2020/7/3
エラー内容:Let’s Encryptで証明書更新失敗
ターミナルに以下の内容が出力されていた。
IMPORTANT NOTES: - The following errors were reported by the server: Domain: rm.yz-it.net Type: unauthorized Detail: Invalid response from https://[サーバFQDN]/.well-known/acme-challenge/qHxIAcwtGMgOnaQFQ4J7h3RnbmoN5O0JUVO8OLRWOIE [[サーバIP]]: "<!DOCTYPE html>\n<html>\n<head>\n <meta charset=\"utf-8\" />\n <title>Redmine 404 error</title>\n <style>\n body {font-family: \"Tr" To fix these errors, please make sure that your domain name was entered correctly and the DNS A/AAAA record(s) for that domain contain(s) the right IP address.
原因:設定に記述されていたDocumentRootと実際のDocumentRootが異なっていたため、更新時にドメイン所有者としての正当性が確認できなかった。アプリケーション構築時に一時ディレクトリを指定して証明書を取得したが、構築後に設定が変更されていなかった。
対応:下記ファイルの最終行で、ドキュメントルートのパスを現在のものに変更
ファイル: /etc/letsencrypt/renewal/[サーバFQDN].conf
# renew_before_expiry = 30 days version = 1.3.0 archive_dir = /etc/letsencrypt/archive/[サーバFQDN] cert = /etc/letsencrypt/live/[サーバFQDN]/cert.pem privkey = /etc/letsencrypt/live/[サーバFQDN]/privkey.pem chain = /etc/letsencrypt/live/[サーバFQDN]/chain.pem fullchain = /etc/letsencrypt/live/[サーバFQDN]/fullchain.pem # Options used in the renewal process [renewalparams] authenticator = webroot account = ************************* server = https://acme-v02.api.letsencrypt.org/directory [[webroot_map]] [サーバFQDN] = [以前のドキュメントルート]
コメント