冲冲冲

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


下载 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

申请成功则会出现

   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

扫描二维码,在手机上阅读!

标签: none

添加新评论