・Let's Encrypt でメインドメイン及びサブドメインの証明書を取得
メインドメイン
[root@centos]# certbot certonly --webroot -w /home/****/www -d www.papa-net.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Enter email address (used for urgent renewal and security notices)
(Enter 'c' to cancel): *****@papa-net.com※受信可能なメールアドレスを指定
--------------------------------------------------------------------------------------------
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server. Do you agree?
--------------------------------------------------------------------------------------------
(Y)es/(N)o: Y※利用条件に同意する
--------------------------------------------------------------------------------------------
Would you be willing, once your first certificate is successfully issued, 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: Y※ニュースやサポート情報のメールを受け取る
≪ 以下省略 ≫
サブドメイン
2回目以降はメールアドレス等の基本情報は登録されているので証明書発行だけになる
[root@centos]# certbot certonly --webroot -w /home/****/sub -d sub.papa-net.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Requesting a certificate for sub.papa-net.com
Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/sub.papa-net.com/fullchain.pem
Key is saved at: /etc/letsencrypt/live/sub.papa-net.com/privkey.pem
This certificate expires on 2022-03-19.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.