kgb.hmuna.com のサーバー証明書の更新†
- 実は(後で気付いたのだが)元々使っていた namecheap の証明書は5年分購入していて、今回は無償で2年分追加の証明書を入手できたのだが
- 今回無償で利用できる Let's Encrypt への移行を行った (20220924)
- 稼働中の charbot を削除し、Let's Encrypt のバージョンをインストール
[KGB] munakata:/etc/apache2/sites-available$ sudo apt-get remove certbot
パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています
状態情報を読み取っています... 完了
以下のパッケージが自動でインストールされましたが、もう必要とされていません:
python3-acme python3-augeas python3-certbot python3-configargparse python3-configobj python3-future python3-icu python3-josepy python3-mock
python3-ndg-httpsclient python3-parsedatetime python3-pbr python3-pyasn1 python3-requests-toolbelt python3-zope.component python3- zope.event python3-zope.hookable
これを削除するには 'sudo apt autoremove' を利用してください。
以下のパッケージは「削除」されます:
certbot python-certbot-apache python3-certbot-apache
アップグレード: 0 個、新規インストール: 0 個、削除: 3 個、保留: 0 個。
1 個のパッケージが完全にインストールまたは削除されていません。
この操作後に 461 kB のディスク容量が解放されます。
続行しますか? [Y/n]
(データベースを読み込んでいます ... 現在 417562 個のファイルとディレクトリがインストールされています。)
python-certbot-apache (0.31.0-1+ubuntu18.04.1+certbot+1) を削除しています ...
python3-certbot-apache (0.31.0-1+ubuntu18.04.1+certbot+1) を削除しています ...
certbot (0.31.0-2~deb10u1+ubuntu18.04.1+certbot+3) を削除しています ...
rsyslog (8.32.0-1ubuntu4.2) を設定しています ...
ユーザー `syslog' はすでにグループ `adm' のメンバーです。
Unsafe symlinks encountered in /var/log/auth.log, refusing.
Unsafe symlinks encountered in /var/log/mail.log, refusing.
Unsafe symlinks encountered in /var/log/kern.log, refusing.
Unsafe symlinks encountered in /var/log/syslog, refusing.
dpkg: パッケージ rsyslog の処理中にエラーが発生しました (--configure):
installed rsyslog package post-installation script subprocess returned error exit status 1
man-db (2.8.3-2ubuntu0.1) のトリガを処理しています ...
処理中にエラーが発生しました:
rsyslog
E: Sub-process /usr/bin/dpkg returned an error code (1)
- charbot の自動インストールスクリプトを利用して Let's Encrypt の証明書のインストール、既存の証明書の無効化、
[KGB] munakata:/etc/apache2/sites-available$ sudo certbot --apache
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Which names would you like to activate HTTPS for?
We recommend selecting either all domains, or all domains in a VirtualHost/server block.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: kgb.hmuna.com
2: svr.hmuna.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): 1
Requesting a certificate for kgb.hmuna.com
Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/kgb.hmuna.com/fullchain.pem
Key is saved at: /etc/letsencrypt/live/kgb.hmuna.com/privkey.pem
This certificate expires on 2022-12-23.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.
Deploying certificate
Successfully deployed certificate for kgb.hmuna.com to /etc/apache2/sites-enabled/kgb.hmuna.com.conf
Congratulations! You have successfully enabled HTTPS on https://kgb.hmuna.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you like Certbot, please consider supporting our work by:
* Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
* Donating to EFF: https://eff.org/donate-le
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 証明書の指定部分を確認 (/etc/apache2/sites-available/ kgb.hmuna.com.conf)
[KGB] munakata:/etc/apache2/sites-available$
SSLCertificateFile /etc/letsencrypt/live/kgb.hmuna.com/fullchain.pem?
SSLCertificateKeyFile /etc/letsencrypt/live/kgb.hmuna.com/privkey.pem?
Include /etc/letsencrypt/options-ssl-apache.conf?