ドキュメント
参考:
ユーザーガイド | Let’s Encrypt 総合ポータル (free-ssl.jp)
コマンド解説 | Let’s Encrypt 総合ポータル (free-ssl.jp)
使い方
参考:
Let’s Encrypt (無料 SSL証明書) についてまとめ – Qiita
Nginx で Let’s Encrypt を使うためのメモ書き | work.log
有効期限を確認する
$ sudo certbot certificates
参考:
let’s encrypt 証明書の有効期限を更新したが確認した – teratail
ブラウザ chrome でサーバー証明書情報を表示するには – teratail
It there a command to show how many days certificate you have? | Let’s Encrypt Community Support
Nginx プラグインを使う
nginx
コマンドが存在するパスを確認する。
$ which nginx /usr/sbin/nginx
cron
に設定するコマンドで、PATH
に nginx
コマンドがあるパス /usr/sbin
を追加する。
PATH="$PATH:/usr/sbin" /usr/bin/certbot renew --nginx
参考:
Pip Nginx | Certbot [Official]
./path/to/certbot-auto --nginx · Issue #4937 · certbot/certbot – GitHub
Nginx + Let’s Encrypt + cron による SSL 証明書の更新が失敗する。- teratail
エラー
ドメインを確認する際にエラーが発生して証明書を取得できない。
Domain: hoge.example.com Type: connection Detail: Fetching http://hoge.example.com/.well-known/acme-challenge/abcdefgxxxxxxxx12345_xxxxxxxxxxxxx_xxxxxxxx: Error getting validation data 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. Additionally, please check that your computer has a publicly routable IP address and that no firewalls are preventing the server from communicating with the client. If you're using the webroot plugin, you should also verify that you are serving files from the webroot path you provided.
証明書の取得に失敗する原因
- DNS が適切に設定されていない (→ ドメイン名で
ping
が通るか確認する。) - ファイアウォールのポートが開放されていない (→ 80 番ポート、443 番ポートが開放されているか確認する。)
- HTTP から HTTPS へのリダイレクトを設定している (→ Web サーバーを停止して
standalone
プラグインで認証を行う。もしくは、リダイレクトを一時的に無効化する。)
エラーの詳細はログを確認する。
$ less /var/log/letsencrypt/letsencrypt.log
参考:
Let’s Encrypt で証明書の取得に失敗したときに確認すること | それからデザイン スタッフブログ
SSL 証明書の自動更新ができなくてログを見てみた結果 | ぴぐろぐ
WEB サイトの SSL 証明書の更新がうまくいかなかった | 銀の鍵
Let’s Encrypt の更新エラーを直す (certbot renew 失敗) | 己で解決!泣かぬなら己で鳴こうホトトギス
Let’s Encrypt の certbotのエラー | foxtrot0304’s diary
certbot renew で Let’s Encrypt の更新エラーが出たので対応しました – Qiita
Let’s Encrypt で証明書を更新できなくなったので再インストールして再発行した | YoshinoriN’s Memento
SSL 証明書の更新でエラーになった時 | Logfile (itemy.net)
Let’s Encrypt を利用した SSL サイトに Firefox でアクセスすると証明書エラーが発生する | iPentec.com