1. 程式人生 > >使用 certbot 對網站免費加 https 協議

使用 certbot 對網站免費加 https 協議

自動 lar red chmod .org ase sid ons chain

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 協議