Let’s Encrypt
いつもはcronで自動更新してるんだけど、なんでかできなくなった。
お品書き
Unable to find a virtual host listening on port 80 which is currently needed for Certbot to prove to the CA that you control your domain. Please add a virtual host for port 80.. Skipping.
最初のエラー。port80が見つかんないよ~って言われてる気がする。サーバの構成がnginxでリバースプロキシ使ってApacheに振ってるせいかなーって思った。
なので、/etc/httpd/conf/httpd.conf に行って、virtual hostのセクションのポートを8080から80に戻した。
Some challenges have failed.. Skipping.
次のエラー。これの他に
Challenge failed for domain dalomo.net Error while running apachectl graceful. Job for httpd.service invalid.
とか
IMPORTANT NOTES: - The following errors were reported by the server: Domain: dalomo.net Type: unauthorized Detail: Invalid response from http://dalomo.net/.well-known/acme-challenge/W************************************ [140.227.173.32]: "<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n <body>\r\n <center><h1>502 Bad Gateway</h1></center>\r\n <hr><center>nginx</cente" 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.
こんなのも。
Let's encrypt で 一時ファイルが作成できない時の対策 - Qiita
Let's Encrypt ユーザーガイド上記に次の記述があります。Webroot プラグインは ${webroot-path}/.well-known/acme-challenge に一時ファ…
とかなのかなーと思って、ディレクトリ作って
vi /etc/nginx/conf.d/reverse_proxy.confを
location ^~ /.well-known/acme-challenge/ { default_type "text/plain"; root /var/www/html/le/; }
てした。でもダメだった。
nginxを止めて更新
無料のSSL証明書「Let’s Encrypt」の更新でエラーが出た
Let’Encryptとはだれでも無料で使えるSSL証明書(正確には「SSL/TLSサーバー証明書」らしいです)を発行してくれるありがたいサービスです。有料での証明書を購入してサーバーにインストールしてもいいのですが、無料のものがあるならそ...
こちらの記事を見つけたので
# systemctl stop nginx # certbot renew
てしたらいけた。うーむ 。
今後更新の際はこれやんないといけなくなるんだろか。
コメント