Let’s Encrypt が更新できなくてrenewしたらドメインに0001が付いた場合の処置

SSLの自動更新が失敗していたので、/certbot-auto renew してみた

Attempting to renew cert (lab.nobi.site) from /etc/letsencrypt/renewal/lab.nobi.site.conf produced an unexpected error: Failed authorization procedure. lab.nobi.site (http-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Fetching https://lab.nobi.site/.well-known/acme-challenge/DqQ7IVyjGDiAI38sfRuHDQ1On6yoFncRzcMwwf5P7y8: Connection refused. Skipping.

よくわからないが、ドメインが確認できなくて認証失敗らしい。
サーバー止めて renew してもエラーが出るので最初からつくる。

./certbot-auto certonly --standalone -d lab.nobi.site

すると

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/lab.nobi.site-0001/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/lab.nobi.site-0001/privkey.pem

なぜかドメインに-0001が付いたものが生成される。

一旦削除してから生成することにした。

./certbot-auto delete  --cert-name lab.nobi.site

./certbot-auto certonly --standalone -d lab.nobi.site

後はwebサーバーを再起動して終了

Categorised in: