码迷,mamicode.com
首页 > Web开发 > 详细

使用 certbot 对网站免费加 https 协议

时间:2018-07-27 16:16:28      阅读:187      评论:0      收藏:0      [点我收藏+]

标签:count   详细   cat   his   port   account   only   cront   更新   

CentOS 系统 Nginx 环境

cd /usr/local/src
wget https://dl.eff.org/certbot-auto
chmod a+x certbot-auto
./certbot-auto --nginx(自动)


出现以下内容表示成功:

IMPORTANT NOTES:

  • Congratulations! Your certificate and chain have been saved at:
    /etc/letsencrypt/live/c.pensukeji.com/fullchain.pem
    Your key file has been saved at:
    /etc/letsencrypt/live/c.pensukeji.com/privkey.pem
    Your cert will expire on 2018-10-16. To obtain a new or tweaked
    version of this certificate in the future, simply run certbot-auto
    again with the "certonly" option. To non-interactively renew all
    of your certificates, run "certbot-auto renew"
  • 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.
  • 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


./certbot-auto renew --dry-run(测试自动续订)
./certbot-auto renew(执行自动续订)
定时任务
为了做到自动化,我们要设置计划任务定时检查更新
编辑/etc/crontab增加一行规则
**12** root ./usr/local/src/certbot-auto renew
详细过程,手动过程及各个版本的安装方式可到以下官网自行查看
Certbot官网网址https://certbot.eff.org/

使用 certbot 对网站免费加 https 协议

标签:count   详细   cat   his   port   account   only   cront   更新   

原文地址:http://blog.51cto.com/12384628/2151060

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!