#ssl証明書の取得。「--nginx」=我が家のウェブサーバー、Apacheなら
「--apache」。「-d」の後に自宅サーバーのdomain名を入力。設定例は
nginxに2個登録している我が家の場合で説明しています。
[root@ufuso ~]# certbot run --nginx -d ufuso.dip.jp -d topi.0t0.jp
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx
#emailを登録してエンターキー押下(障害時のサポートに必要)
Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel): tu@ufuso.dip.jp
Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org
-------------------------------------------------------------------------------
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 at
https://acme-v01.api.letsencrypt.org/directory
-------------------------------------------------------------------------------
#「A」入力後リターンキー押下。同意しないと先に進めない
(A)gree/(C)ancel: A
-------------------------------------------------------------------------------
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 EFF and
our work to encrypt the web, protect its users and defend digital rights.
-------------------------------------------------------------------------------
#「N」入力後リターンキー押下。あなたのemailを利用してもいいかの質問なので
(Y)es/(N)o: N
Obtaining a new certificate
Performing the following challenges:
tls-sni-01 challenge for ufuso.dip.jp
tls-sni-01 challenge for topi.0t0.jp
Waiting for verification...
Cleaning up challenges
#ドメイン「dip.jp」は登録が多いので登録制限中とのこと
An unexpected error occurred:
There were too many requests of a given type :: Error creating new cert
:: too many certificates already issued for: dip.jp
Please see the logfiles in /var/log/letsencrypt for more details.
IMPORTANT NOTES:
- Your account credentials have been saved in your Certbot
configuration directory at /etc/letsencrypt. You should make a
secure backup of this folder now. This configuration directory will
also contain certificates and private keys obtained by Certbot so
making regular backups of this folder is ideal.
ssl証明書を個別編集
#「topi.0t0.jp」のssl証明書を個別に設定
[root@ufuso ~]# certbot
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx
Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org
#「topi.0t0.jp」なので、「1」を入力してエンターキー押下
Which names would you like to activate HTTPS for?
-------------------------------------------------------------------------------
1: topi.0t0.jp
2: ufuso.dip.jp
3: ufuso.org
-------------------------------------------------------------------------------
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): 1
Obtaining a new certificate
Performing the following challenges:
tls-sni-01 challenge for topi.0t0.jp
Waiting for verification...
Cleaning up challenges
Deployed Certificate to VirtualHost /etc/nginx/nginx.conf for set(['topi.0t0.jp'])
#常にHTTPSでの接続をするなら「2」を入力してエンターキー押下。それ以外は「1」
Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
-------------------------------------------------------------------------------
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
-------------------------------------------------------------------------------
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2
Redirecting all traffic on port 80 to ssl in /etc/nginx/nginx.conf
-------------------------------------------------------------------------------
Congratulations! You have successfully enabled https://topi.0t0.jp
You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=topi.0t0.jp
-------------------------------------------------------------------------------
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/topi.0t0.jp/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/topi.0t0.jp/privkey.pem
Your cert will expire on 2018-02-19. To obtain a new or tweaked
version of this certificate in the future, simply run certbot again
with the "certonly" option. To non-interactively renew *all* of
your certificates, run "certbot 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
自宅サーバーから別PCに転送しているドメインのssl証明書を編集
#「ufuso.org」のssl証明書を個別に設定
[root@ufuso ~]# certbot
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx
Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org
#「ufuso.org」なので、「3」を入力してエンターキー押下
Which names would you like to activate HTTPS for?
-------------------------------------------------------------------------------
1: topi.0t0.jp
2: ufuso.dip.jp
3: ufuso.org
-------------------------------------------------------------------------------
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): 3
Cert not yet due for renewal
You have an existing certificate that has exactly the same domains or certificate name you requested and isn't close to expiry.
(ref: /etc/letsencrypt/renewal/ufuso.org.conf)
What would you like to do?
#期間延長なら「2」を入力してエンターキー押下。再Installは「1」
-------------------------------------------------------------------------------
1: Attempt to reinstall this existing certificate
2: Renew & replace the cert (limit ~5 per 7 days)
-------------------------------------------------------------------------------
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2
Renewing an existing certificate
Performing the following challenges:
tls-sni-01 challenge for ufuso.org
Waiting for verification...
Cleaning up challenges
Deployed Certificate to VirtualHost /etc/nginx/nginx.conf for set(['ufuso.org'])
#常にHTTPSでの接続をするなら「2」を入力してエンターキー押下。それ以外は「1」
Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
-------------------------------------------------------------------------------
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
-------------------------------------------------------------------------------
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2
The appropriate server block is already redirecting traffic. To enable redirect anyway, uncomment the redirect lines in /etc/nginx/nginx.conf.
-------------------------------------------------------------------------------
Your existing certificate has been successfully renewed, and the new certificate
has been installed.
The new certificate covers the following domains: https://ufuso.org
You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=ufuso.org
-------------------------------------------------------------------------------
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/ufuso.org/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/ufuso.org/privkey.pem
Your cert will expire on 2018-02-22. To obtain a new or tweaked
version of this certificate in the future, simply run certbot again
with the "certonly" option. To non-interactively renew *all* of
your certificates, run "certbot 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