首页 > Web开发 > 详细

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

时间:2018-07-27 16:07:31      阅读:200      评论:0      收藏:0      [点我收藏+]
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 协议

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!