Let’s Encryptに無料でサーバー証明書を発行してもらいます。
# apt -y install certbot
下記は当サイトwww.yut.workの例です。自分の環境にあわせて読み替えてください。
# certbot certonly –webroot -w /var/www/html -d www.yut.work
オプション | 説明 |
certonly | 証明書の作成のみを行います |
-webroot | ウェブサーバーモードを指定 |
-w /var/www/html | 対象ドメインのドキュメントルート |
-d yut.work | 対象ドメイン(複数指定可) |
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Enter email address (used for urgent renewal and security notices)
# 受信可能なメールアドレスを指定
(Enter 'c' to cancel): root@yut.work
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Certbot 開発の非営利団体 Electronic Frontier Foundation にもメールアドレスを登録するか否か
(Y)es/(N)o: y
Account registered.
Requesting a certificate for www.yut.work
Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/www.yut.work/fullchain.pem
Key is saved at: /etc/letsencrypt/live/www.yut.work/privkey.pem
This certificate expires on 2024-07-29.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ポート80がサーバーに通ってないと失敗します。ルーターとufwの通過許可を忘れずに!
コメント