IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/example.com/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/example.com/privkey.pem
Your cert will expire on 2020-03-12. 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
现在您已经有了证书文件,您可以编辑您的域服务器块如下:
/etc/nginx/conf.d/example.com.conf
server{listen80;server_namewww.example.comexample.com;includesnippets/letsencrypt.conf;return301https://$host$request_uri;}server{listen443sslhttp2;server_namewww.example.com;ssl_certificate/etc/letsencrypt/live/example.com/fullchain.pem;ssl_certificate_key/etc/letsencrypt/live/example.com/privkey.pem;ssl_trusted_certificate/etc/letsencrypt/live/example.com/chain.pem;includesnippets/ssl.conf;includesnippets/letsencrypt.conf;return301https://example.com$request_uri;}server{listen443sslhttp2;server_nameexample.com;ssl_certificate/etc/letsencrypt/live/example.com/fullchain.pem;ssl_certificate_key/etc/letsencrypt/live/example.com/privkey.pem;ssl_trusted_certificate/etc/letsencrypt/live/example.com/chain.pem;includesnippets/ssl.conf;includesnippets/letsencrypt.conf;# . . . other code
}