White's Blog.

使用let’s encrypt ssl 更新SSL证书

字数统计: 207Reading time: 1 min
2019/02/23 Share

本文参考静静姐姐的文章,写在这用以方便更新博客证书。


下载 certbot

git clone https://github.com/certbot/certbot.git

执行证书申请

cd certbot

./letsencrypt-auto certonly --webroot --webroot-path [Nginx网站的根目录] -d [你要申请证书的域名] -m [你的邮箱]

以我为例:

./letsencrypt-auto certonly --webroot --webroot-path /usr/share/nginx/typecho/build -d white.xmutsec.com -m test@gmail.com

申请成功则会出现

1
2
3
4
5
6
7
8
9
10
11
12
13
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/white.xmutsec.com/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/white.xmutsec.com/privkey.pem
Your cert will expire on 2019-05-24. To obtain a new or tweaked
version of this certificate in the future, simply run
letsencrypt-auto again. To non-interactively renew *all* of your
certificates, run "letsencrypt-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

接着重载nginx

service nginx reload

原文作者:White

发表日期:February 23rd 2019, 5:38:00 pm

更新日期:November 12th 2019, 9:23:37 am

CATALOG
  1. 1. 以我为例: