#「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
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
Cert is due for renewal, auto-renewing...
Renewing an existing certificate
Performing the following challenges:
tls-sni-01 challenge for topi.0t0.jp
Waiting for verification...
Cleaning up challenges
Failed authorization procedure. topi.0t0.jp (tls-sni-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Incorrect validation certificate for tls-sni-01 challenge. Requested f25953eda98e352e941a88db3c4cdda9.ed89753aea2f88a77434c43de7dd7630.acme.invalid from 60.92.88.148:443. Received 1 certificate(s), first certificate had names "ufuso.dip.jp"
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: topi.0t0.jp
Type: unauthorized
Detail: Incorrect validation certificate for tls-sni-01 challenge.
Requested
f25953eda98e352e941a88db3c4cdda9.ed89753aea2f88a77434c43de7dd7630.acme.invalid
from 60.92.88.148:443. Received 1 certificate(s), first certificate
had names "ufuso.dip.jp"
#下の朱書き部分から、エラー原因は番号とドメイン名の不一致。3についても同じ
エラーが出た。原因特定は先送りしてエラーの解消からTo fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address.#ドメイン「dip.jp」は登録が多いので登録制限中らしく、2は元々証明書
を得られていなかった。
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.
SSL/TLS サーバ証明書の取得
#certbotはLet's Encryptを利用するためのコマンド、 authenticatorは証明書
取得のPlugin、standaloneは証明書を必要とするWebServerを使って証明書を取得、
--installer nginxはnginxに証明書を自動でInstall、-d ufuso.dip.jp はドメイ
ン証明書を取得するDomainの指定、--pre-hook "systemctl stop nginx"は取得前
にnginを゜stop、 --post-hook "systemctl start nginx"は取得後にnginxをstart
[root@ufuso ~]# certbot --authenticator standalone --installer nginx -d ufuso.dip.jp --pre-hook "systemctl stop nginx" --post-hook "systemctl start nginx"
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator standalone, Installer nginx
Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org
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.dip.jp.conf)
What would you like to do?
#再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): 1
Keeping the existing certificate
Deployed Certificate to VirtualHost /etc/nginx/nginx.conf for set(['ufuso.dip.jp'])
Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
#常にHTTPSでの接続をするので「2」を入力してエンターキー押下。
-------------------------------------------------------------------------------
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
Traffic on port 80 already redirecting to ssl in /etc/nginx/nginx.conf
-------------------------------------------------------------------------------
Congratulations! You have successfully enabled https://ufuso.dip.jp
You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=ufuso.dip.jp
-------------------------------------------------------------------------------
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/ufuso.dip.jp/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/ufuso.dip.jp/privkey.pem
Your cert will expire on 2018-12-10. 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
#ドメイン「dip.jp」は登録が多いので登録制限中のため証明書を取得できなかった
のだが、今回はなぜだかできてしまった。理由は不明