Let's Encryptで無料の暗号化鍵を発行しよう!
ここでは、無料で使える認証局、Let's Encryptを使った証明書の取得について掲載しています。
Let's Encryptとは…?
通常、SSLでの認証に必要な証明書はベリサインやグローバルサインなどの認証局から発行される証明書と鍵を使い、通信の暗号化と発信者の信頼性を確保(実在証明)します。
しかし、この手続きには費用がかかります。
かと言って、自前の証明書と鍵では、通信の暗号化は可能ですが、実在証明をすることはできません。勝手に鍵を作って、「私は安全ですよ^^」と勝手に騒いでるだけ…って状態です。
なので、自前の証明書と鍵を使った場合、ブラウザでは以下のような警告が表示されます。

もちろんこのまま使用を続けることも可能ですが、初めてそのサイトを見た人は「え…大丈夫なの?」って思いますよね?でも、所詮自宅サーバ、費用はかけたくない…。
そこで登場するのがLet's Encrypt。Let's Encryptはネット通信の暗号化を広く普及させることを目的に2016年に始まったプロジェクトで、無料で使える認証局です。最近のブラウザなら上でご紹介したような警告が表示されることがありません。
ただし、無料なのはClass 1(ドメイン認証)に限ります。Class 1ではドメインの所有者のみの証明になります。信頼度という点では「自分で発行した証明書よりはマシ」程度に考えた方が良いでしょう。
業務で使う場合は有料のものを使った方が良さそうです。
詳しくは、Let's Encrypt 総合ポータルをご覧ください。
Let's Encryptによる認証鍵の発行
前提条件として、以下を満たす必要があります。
- ・ドメイン名、ホスト名でサーバにアクセスできること
Webサーバ構築済みとして話が進みますが、Webサーバ等はこの時点では必要ありません。
[root@rl8 ~]# dnf -y --enablerepo=epel install certbot python3-certbot-apache
================================================================================
パッケージ Arch バージョン Repo サイズ
================================================================================
インストール:
certbot noarch 1.22.0-1.el8 epel 54 k
python3-certbot-apache noarch 1.22.0-1.el8 epel 145 k
依存関係のインストール:
apr x86_64 1.6.3-12.el8 appstream 128 k
apr-util x86_64 1.6.1-6.el8.1 appstream 104 k
augeas-libs x86_64 1.12.0-6.el8 baseos 435 k
httpd x86_64 2.4.37-43.module+el8.5.0+727+743c5577.1
appstream 1.4 M
httpd-filesystem noarch 2.4.37-43.module+el8.5.0+727+743c5577.1
appstream 39 k
httpd-tools x86_64 2.4.37-43.module+el8.5.0+727+743c5577.1
appstream 106 k
mod_http2 x86_64 1.15.7-3.module+el8.5.0+695+1fa8055e
appstream 153 k
mod_ssl x86_64 1:2.4.37-43.module+el8.5.0+727+743c5577.1
appstream 135 k
python3-acme noarch 1.22.0-1.el8 epel 96 k
python3-augeas noarch 0.5.0-12.el8 appstream 30 k
python3-certbot noarch 1.22.0-1.el8 epel 426 k
python3-cffi x86_64 1.11.5-5.el8 baseos 237 k
python3-configargparse noarch 0.14.0-6.el8 epel 36 k
python3-cryptography x86_64 3.2.1-5.el8 baseos 558 k
python3-distro noarch 1.4.0-2.module+el8.3.0+120+426d8baf
appstream 36 k
python3-josepy noarch 1.9.0-1.el8 epel 103 k
python3-parsedatetime noarch 2.5-1.el8 epel 79 k
python3-pip noarch 9.0.3-20.el8.rocky.0 appstream 19 k
python3-pyOpenSSL noarch 19.0.0-1.el8 appstream 102 k
python3-pycparser noarch 2.14-14.el8 baseos 108 k
python3-pyrfc3339 noarch 1.1-1.el8 epel 19 k
python3-pytz noarch 2017.2-9.el8 appstream 53 k
python3-requests-toolbelt noarch 0.9.1-4.el8 epel 91 k
python3-zope-component noarch 4.3.0-8.el8 epel 313 k
python3-zope-event noarch 4.2.0-12.el8 epel 210 k
python3-zope-interface x86_64 4.6.0-1.el8 epel 158 k
python36 x86_64 3.6.8-38.module+el8.5.0+671+195e4563
appstream 18 k
rocky-logos-httpd noarch 85.0-3.el8 baseos 22 k
弱い依存関係のインストール:
apr-util-bdb x86_64 1.6.1-6.el8.1 appstream 23 k
apr-util-openssl x86_64 1.6.1-6.el8.1 appstream 26 k
python-josepy-doc noarch 1.9.0-1.el8 epel 23 k
モジュールストリームの有効化中:
httpd 2.4
python36 3.6
トランザクションの概要
================================================================================
インストール 33 パッケージ
ダウンロードサイズの合計: 5.4 M
インストール後のサイズ: 19 M
パッケージのダウンロード:
(1/33): apr-util-bdb-1.6.1-6.el8.1.x86_64.rpm 164 kB/s | 23 kB 00:00
(2/33): apr-util-1.6.1-6.el8.1.x86_64.rpm 629 kB/s | 104 kB 00:00
(3/33): apr-1.6.3-12.el8.x86_64.rpm 662 kB/s | 128 kB 00:00
(4/33): apr-util-openssl-1.6.1-6.el8.1.x86_64.r 469 kB/s | 26 kB 00:00
(5/33): httpd-filesystem-2.4.37-43.module+el8.5 298 kB/s | 39 kB 00:00
(6/33): mod_http2-1.15.7-3.module+el8.5.0+695+1 1.2 MB/s | 153 kB 00:00
(7/33): httpd-tools-2.4.37-43.module+el8.5.0+72 400 kB/s | 106 kB 00:00
(8/33): httpd-2.4.37-43.module+el8.5.0+727+743c 3.9 MB/s | 1.4 MB 00:00
(9/33): mod_ssl-2.4.37-43.module+el8.5.0+727+74 1.7 MB/s | 135 kB 00:00
(10/33): python3-augeas-0.5.0-12.el8.noarch.rpm 230 kB/s | 30 kB 00:00
(11/33): python3-distro-1.4.0-2.module+el8.3.0+ 355 kB/s | 36 kB 00:00
(12/33): python3-pip-9.0.3-20.el8.rocky.0.noarc 116 kB/s | 19 kB 00:00
(13/33): python3-pytz-2017.2-9.el8.noarch.rpm 482 kB/s | 53 kB 00:00
(14/33): python3-pyOpenSSL-19.0.0-1.el8.noarch. 682 kB/s | 102 kB 00:00
(15/33): python36-3.6.8-38.module+el8.5.0+671+1 378 kB/s | 18 kB 00:00
(16/33): augeas-libs-1.12.0-6.el8.x86_64.rpm 2.4 MB/s | 435 kB 00:00
(17/33): python3-cffi-1.11.5-5.el8.x86_64.rpm 1.1 MB/s | 237 kB 00:00
(18/33): python3-cryptography-3.2.1-5.el8.x86_6 2.3 MB/s | 558 kB 00:00
(19/33): python3-pycparser-2.14-14.el8.noarch.r 1.2 MB/s | 108 kB 00:00
(20/33): rocky-logos-httpd-85.0-3.el8.noarch.rp 334 kB/s | 22 kB 00:00
(21/33): python-josepy-doc-1.9.0-1.el8.noarch.r 290 kB/s | 23 kB 00:00
(22/33): certbot-1.22.0-1.el8.noarch.rpm 495 kB/s | 54 kB 00:00
(23/33): python3-acme-1.22.0-1.el8.noarch.rpm 735 kB/s | 96 kB 00:00
(24/33): python3-certbot-apache-1.22.0-1.el8.no 1.3 MB/s | 145 kB 00:00
(25/33): python3-configargparse-0.14.0-6.el8.no 365 kB/s | 36 kB 00:00
(26/33): python3-josepy-1.9.0-1.el8.noarch.rpm 1.2 MB/s | 103 kB 00:00
(27/33): python3-certbot-1.22.0-1.el8.noarch.rp 2.0 MB/s | 426 kB 00:00
(28/33): python3-pyrfc3339-1.1-1.el8.noarch.rpm 643 kB/s | 19 kB 00:00
(29/33): python3-parsedatetime-2.5-1.el8.noarch 1.0 MB/s | 79 kB 00:00
(30/33): python3-zope-component-4.3.0-8.el8.noa 3.7 MB/s | 313 kB 00:00
(31/33): python3-zope-interface-4.6.0-1.el8.x86 2.9 MB/s | 158 kB 00:00
(32/33): python3-requests-toolbelt-0.9.1-4.el8. 589 kB/s | 91 kB 00:00
(33/33): python3-zope-event-4.2.0-12.el8.noarch 1.6 MB/s | 210 kB 00:00
--------------------------------------------------------------------------------
合計 1.8 MB/s | 5.4 MB 00:03
トランザクションの確認を実行中
トランザクションの確認に成功しました。
トランザクションのテストを実行中
トランザクションのテストに成功しました。
トランザクションを実行中
準備 : 1/1
インストール中 : apr-1.6.3-12.el8.x86_64 1/33
scriptletの実行中: apr-1.6.3-12.el8.x86_64 1/33
インストール中 : apr-util-bdb-1.6.1-6.el8.1.x86_64 2/33
インストール中 : apr-util-openssl-1.6.1-6.el8.1.x86_64 3/33
インストール中 : apr-util-1.6.1-6.el8.1.x86_64 4/33
scriptletの実行中: apr-util-1.6.1-6.el8.1.x86_64 4/33
インストール中 : python3-pyrfc3339-1.1-1.el8.noarch 5/33
インストール中 : python3-pytz-2017.2-9.el8.noarch 6/33
scriptletの実行中: httpd-filesystem-2.4.37-43.module+el8.5.0+727+743c 7/33
インストール中 : httpd-filesystem-2.4.37-43.module+el8.5.0+727+743c 7/33
インストール中 : httpd-tools-2.4.37-43.module+el8.5.0+727+743c5577. 8/33
インストール中 : python36-3.6.8-38.module+el8.5.0+671+195e4563.x86_ 9/33
scriptletの実行中: python36-3.6.8-38.module+el8.5.0+671+195e4563.x86_ 9/33
インストール中 : python3-pip-9.0.3-20.el8.rocky.0.noarch 10/33
インストール中 : python3-zope-event-4.2.0-12.el8.noarch 11/33
インストール中 : python3-zope-interface-4.6.0-1.el8.x86_64 12/33
インストール中 : python3-zope-component-4.3.0-8.el8.noarch 13/33
インストール中 : python3-requests-toolbelt-0.9.1-4.el8.noarch 14/33
インストール中 : python3-parsedatetime-2.5-1.el8.noarch 15/33
インストール中 : python3-configargparse-0.14.0-6.el8.noarch 16/33
インストール中 : python-josepy-doc-1.9.0-1.el8.noarch 17/33
インストール中 : rocky-logos-httpd-85.0-3.el8.noarch 18/33
インストール中 : mod_http2-1.15.7-3.module+el8.5.0+695+1fa8055e.x86 19/33
インストール中 : httpd-2.4.37-43.module+el8.5.0+727+743c5577.1.x86_ 20/33
scriptletの実行中: httpd-2.4.37-43.module+el8.5.0+727+743c5577.1.x86_ 20/33
インストール中 : mod_ssl-1:2.4.37-43.module+el8.5.0+727+743c5577.1. 21/33
インストール中 : python3-pycparser-2.14-14.el8.noarch 22/33
インストール中 : python3-cffi-1.11.5-5.el8.x86_64 23/33
インストール中 : python3-cryptography-3.2.1-5.el8.x86_64 24/33
インストール中 : python3-pyOpenSSL-19.0.0-1.el8.noarch 25/33
インストール中 : python3-josepy-1.9.0-1.el8.noarch 26/33
インストール中 : python3-acme-1.22.0-1.el8.noarch 27/33
インストール中 : augeas-libs-1.12.0-6.el8.x86_64 28/33
scriptletの実行中: augeas-libs-1.12.0-6.el8.x86_64 28/33
インストール中 : python3-augeas-0.5.0-12.el8.noarch 29/33
インストール中 : python3-distro-1.4.0-2.module+el8.3.0+120+426d8baf 30/33
インストール中 : python3-certbot-1.22.0-1.el8.noarch 31/33
インストール中 : certbot-1.22.0-1.el8.noarch 32/33
scriptletの実行中: certbot-1.22.0-1.el8.noarch 32/33
インストール中 : python3-certbot-apache-1.22.0-1.el8.noarch 33/33
scriptletの実行中: httpd-2.4.37-43.module+el8.5.0+727+743c5577.1.x86_ 33/33
scriptletの実行中: python3-certbot-apache-1.22.0-1.el8.noarch 33/33
検証 : apr-1.6.3-12.el8.x86_64 1/33
検証 : apr-util-1.6.1-6.el8.1.x86_64 2/33
検証 : apr-util-bdb-1.6.1-6.el8.1.x86_64 3/33
検証 : apr-util-openssl-1.6.1-6.el8.1.x86_64 4/33
検証 : httpd-2.4.37-43.module+el8.5.0+727+743c5577.1.x86_ 5/33
検証 : httpd-filesystem-2.4.37-43.module+el8.5.0+727+743c 6/33
検証 : httpd-tools-2.4.37-43.module+el8.5.0+727+743c5577. 7/33
検証 : mod_http2-1.15.7-3.module+el8.5.0+695+1fa8055e.x86 8/33
検証 : mod_ssl-1:2.4.37-43.module+el8.5.0+727+743c5577.1. 9/33
検証 : python3-augeas-0.5.0-12.el8.noarch 10/33
検証 : python3-distro-1.4.0-2.module+el8.3.0+120+426d8baf 11/33
検証 : python3-pip-9.0.3-20.el8.rocky.0.noarch 12/33
検証 : python3-pyOpenSSL-19.0.0-1.el8.noarch 13/33
検証 : python3-pytz-2017.2-9.el8.noarch 14/33
検証 : python36-3.6.8-38.module+el8.5.0+671+195e4563.x86_ 15/33
検証 : augeas-libs-1.12.0-6.el8.x86_64 16/33
検証 : python3-cffi-1.11.5-5.el8.x86_64 17/33
検証 : python3-cryptography-3.2.1-5.el8.x86_64 18/33
検証 : python3-pycparser-2.14-14.el8.noarch 19/33
検証 : rocky-logos-httpd-85.0-3.el8.noarch 20/33
検証 : certbot-1.22.0-1.el8.noarch 21/33
検証 : python-josepy-doc-1.9.0-1.el8.noarch 22/33
検証 : python3-acme-1.22.0-1.el8.noarch 23/33
検証 : python3-certbot-1.22.0-1.el8.noarch 24/33
検証 : python3-certbot-apache-1.22.0-1.el8.noarch 25/33
検証 : python3-configargparse-0.14.0-6.el8.noarch 26/33
検証 : python3-josepy-1.9.0-1.el8.noarch 27/33
検証 : python3-parsedatetime-2.5-1.el8.noarch 28/33
検証 : python3-pyrfc3339-1.1-1.el8.noarch 29/33
検証 : python3-requests-toolbelt-0.9.1-4.el8.noarch 30/33
検証 : python3-zope-component-4.3.0-8.el8.noarch 31/33
検証 : python3-zope-event-4.2.0-12.el8.noarch 32/33
検証 : python3-zope-interface-4.6.0-1.el8.x86_64 33/33
インストール済み:
apr-1.6.3-12.el8.x86_64
apr-util-1.6.1-6.el8.1.x86_64
apr-util-bdb-1.6.1-6.el8.1.x86_64
apr-util-openssl-1.6.1-6.el8.1.x86_64
augeas-libs-1.12.0-6.el8.x86_64
certbot-1.22.0-1.el8.noarch
httpd-2.4.37-43.module+el8.5.0+727+743c5577.1.x86_64
httpd-filesystem-2.4.37-43.module+el8.5.0+727+743c5577.1.noarch
httpd-tools-2.4.37-43.module+el8.5.0+727+743c5577.1.x86_64
mod_http2-1.15.7-3.module+el8.5.0+695+1fa8055e.x86_64
mod_ssl-1:2.4.37-43.module+el8.5.0+727+743c5577.1.x86_64
python-josepy-doc-1.9.0-1.el8.noarch
python3-acme-1.22.0-1.el8.noarch
python3-augeas-0.5.0-12.el8.noarch
python3-certbot-1.22.0-1.el8.noarch
python3-certbot-apache-1.22.0-1.el8.noarch
python3-cffi-1.11.5-5.el8.x86_64
python3-configargparse-0.14.0-6.el8.noarch
python3-cryptography-3.2.1-5.el8.x86_64
python3-distro-1.4.0-2.module+el8.3.0+120+426d8baf.noarch
python3-josepy-1.9.0-1.el8.noarch
python3-parsedatetime-2.5-1.el8.noarch
python3-pip-9.0.3-20.el8.rocky.0.noarch
python3-pyOpenSSL-19.0.0-1.el8.noarch
python3-pycparser-2.14-14.el8.noarch
python3-pyrfc3339-1.1-1.el8.noarch
python3-pytz-2017.2-9.el8.noarch
python3-requests-toolbelt-0.9.1-4.el8.noarch
python3-zope-component-4.3.0-8.el8.noarch
python3-zope-event-4.2.0-12.el8.noarch
python3-zope-interface-4.6.0-1.el8.x86_64
python36-3.6.8-38.module+el8.5.0+671+195e4563.x86_64
rocky-logos-httpd-85.0-3.el8.noarch
完了しました!
[root@rl8 ~]# cd
証明書の生成
Let's Encryptでは、certbot-autoというプログラムが初めから用意されていて、自動的に証明書の発行や更新を行ってくれます。
証明書にはドメイン名(mhserv.info)だけでなく、ホスト名(www.mhserv.infoなど)も複数登録可能なので、URLに使いたいものを登録しておきましょう。(ドメイン名は必須です)
尚、certbot-autoはWebサーバ機能を持っており、Apacheが動作していると競合してうまく動きません。動いている場合は一度止めておきます。
[root@rl8 ~]# systemctl stop httpd
httpd を停止中: [ OK ]
[root@rl8 ~]# usr/local/certbot/certbot-auto certonly --standalone /
--agree-tos /
-d mhserv.info(ドメイン名) /
-d www.mhserv.info(ホスト名) /
-m 管理者のメールアドレス
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator standalone, Installer None
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for mhserv.info
http-01 challenge for www.mhserv.info
Waiting for verification...
Cleaning up challenges
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/mhserv.info/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/mhserv.info/privkey.pem
Your cert will expire on 2019-03-24. To obtain a new or tweaked
version of this certificate in the future, simply run certbot-auto
again. To non-interactively renew *all* of your certificates, run
"certbot-auto renew"
- 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-les
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about our work
encrypting the web, EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: n
[root@rl8 ~]# systemctl start httpd
httpd を開始中: [ OK ]
ちなみに、途中の"n"は「暗号化技術に関しての情報をメールで送って良いかい?」の問いに対してのものです。欲しい場合は"y"と回答してください。
証明書の自動更新
Let's Encryptで発行された証明書の有効期限は3ヶ月です。期限が切れる前に更新作業が必要です。
[root@rl8 ~]# vi /etc/cron.monthly/certbot-renew.sh
#!/bin/bash
systemctl stop httpd
certbot renew --force-renew --dry-run
systemctl start httpd
[root@rl8 ~]# chmod +x /etc/cron.monthly/certbot-renew.sh
"--dry-run"(テストのみで更新はしない)を付け、正しく動作するかの確認をします。
[root@rl8 ~]# sh /etc/cron.monthly/certbot-renew.sh
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
** DRY RUN: simulating 'certbot renew' close to cert expiry
** (The test certificates below ha
ve not been saved.)
Congratulations, all renewals succeeded. The following certs have been renewed:
/etc/letsencrypt/live/ij-pc.com/fullchain.pem (success)
** DRY RUN: simulating 'certbot renew' close to cert expiry
** (The test certificates above have not been saved.)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"all renewals succeeded."と表示され、問題なくテストが進んだら、"--dry-run"を削除しましょう。
[root@rl8 ~]# vi /etc/cron.monthly/certbot-renew.sh
#!/bin/bash systemctl stop httpd certbot renew --force-renew systemctl start httpd
これで、1ヶ月に1回くらいのペースで自動更新を試みてくれます。
あまり短いペースだと更新を弾かれるようですが、翌月には更新されると思います。
MyDNSを利用している方へ
Let's Encryptには、1週間当たりの発行数制限があります。これはドメインごとに管理されているため、自分以外の方がmydns.jpドメインで証明書を作成した場合もカウントされていきます。
発行数制限に引っかかると、以下のような表示が出ます。
An unexpected error occurred: There were too many requests of a given type :: Error creating new order :: too many failed authorizations recently: see https://letsencrypt.org/docs/rate-limits/
MyDNSワイルドカード対応証明書発行スクリプトの設置
今回はワイルドカードを使った証明書を有志の方が公開しているので、それを使って簡単に取得したいと思います。
[root@rl8 ~]# wget 'https://github.com/disco-v8/DirectEdit/archive/master.zip' -O DirectEdit-master.zip
--2018-12-24 16:59:39-- https://github.com/disco-v8/DirectEdit/archive/master.zip github.com をDNSに問いあわせています... 192.30.255.112, 192.30.255.113 github.com|192.30.255.112|:443 に接続しています... 接続しました。 HTTP による接続要求を送信しました、応答を待っています... 302 Found 場所: https://codeload.github.com/disco-v8/DirectEdit/zip/master [続く] --2018-12-24 16:59:40-- https://codeload.github.com/disco-v8/DirectEdit/zip/master codeload.github.com をDNSに問いあわせています... 192.30.255.121, 192.30.255.120 codeload.github.com|192.30.255.121|:443 に接続しています... 接続しました。 HTTP による接続要求を送信しました、応答を待っています... 200 OK 長さ: 特定できません [application/zip] `DirectEdit-master.zip' に保存中 [ <=> ] 4,177 --.-K/s 時間 0.002s 2018-12-24 16:59:41 (2.37 MB/s) - `DirectEdit-master.zip' へ保存終了 [4177]
[root@rl8 ~]# unzip DirectEdit-master.zip
Archive: DirectEdit-master.zip ea88d664c1b19f2cfa55d4b05f7571cf5e4a13d5 creating: DirectEdit-master/ inflating: DirectEdit-master/README inflating: DirectEdit-master/txtdelete.php inflating: DirectEdit-master/txtedit.conf inflating: DirectEdit-master/txtregist.php
[root@rl8 ~]# rm -f DirectEdit-master.zip
[root@rl8 ~]# mv DirectEdit-master /opt/
ワイルドカード対応証明書発行スクリプトの設定
設定ファイルにアカウントの情報を入力します。
[root@rl8 ~]# cd /opt/DirectEdit-master
[root@rl8 DirectEdit-master]# vi txtedit.conf
<?php $MYDNSJP_URL = 'https://www.mydns.jp/directedit.html'; $MYDNSJP_MASTERID = 'MyDNSのID'; $MYDNSJP_MASTERPWD = 'MyDNSのパスワード'; $MYDNSJP_DOMAIN = '取得したドメイン'; ?>
パーミッションの設定
スクリプトにパーミッションの設定を行います。
[root@rl8 DirectEdit-master]# chown root:root ./
[root@rl8 DirectEdit-master]# chmod 700 ./*.php
[root@rl8 DirectEdit-master]# chmod 600 ./*.conf
証明書の取得
設定が終わったら、実際に証明書を発行してもらいましょう。
[root@rl8 DirectEdit-master]# /usr/local/certbot/certbot-auto certonly --manual \
--preferred-challenges=dns \
--manual-auth-hook /opt/DirectEdit-master/txtregist.php \
--manual-cleanup-hook /opt/DirectEdit-master/txtdelete.php \
-d 取得したドメイン -d *.取得したドメイン \
--server https://acme-v02.api.letsencrypt.org/directory \
--agree-tos -m 管理者のメールアドレス \
--manual-public-ip-logging-ok
Saving debug log to /var/log/letsencrypt/letsencrypt.log Plugins selected: Authenticator manual, Installer None Obtaining a new certificate Performing the following challenges: dns-01 challenge for mhserv.mydns.jp dns-01 challenge for mhserv.mydns.jp Waiting for verification... Cleaning up challenges IMPORTANT NOTES: - Congratulations! Your certificate and chain have been saved at: /etc/letsencrypt/live/mhserv.mydns.jp/fullchain.pem Your key file has been saved at: /etc/letsencrypt/live/mhserv.mydns.jp/privkey.pem Your cert will expire on 2019-03-24. To obtain a new or tweaked version of this certificate in the future, simply run certbot-auto again. To non-interactively renew *all* of your certificates, run "certbot-auto renew" - 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
参考にしたサイト様
Qiita - さくらのVPS(Cent OS6.8)でLet's Encryptを自動更新する方法
Qiita - 無料でHTTPS化できる「Let's Encrypt」をやってみた
Qiita - 突然GitHubとhttps通信できなくなったときの解決メモ
CPoint LAB. news - Let’s Encrypt + MyDNS でワイルドカードSSL証明書を自動更新する方法
今回新しく登場したコマンド
[広告]

トップページ
Rocky Linux 8
○インストール準備
○仮想化準備(VMware)
○仮想化準備(Hyper-V)
○導入
○基本操作
○セキュリティ対策
○Dynamic DNS
○NTPサーバ
○データベース
○WEBサーバ
○その他
CentOS 7
Scientific Linux 6
CentOS 5
ブログ
[広告]