Certbot 已經成為 Let's Encrypt 的官方 Client
使用很簡單
cd /usr/local/bin
wget https://dl.eff.org/certbot-auto
chmod a+x certbot-auto
certbot-auto certonly --webroot -w /var/www/html -m yourname@email.com -d yourdomain.com -d www.yourdomain.com
若有更多域名, 繼續加 -d 參數指定
憑證會產生在 /etc/letsencrypt/live/
剩下不到30天內到期可以執行 Renew 指令
certbot-auto renew
Apache 設定
Uncomment Include conf/extra/httpd-ssl.conf in httpd.conf
conf/extra/httpd-ssl.conf 內容
SSLCertificateFile "/etc/letsencrypt/live/yourdomain.com/cert.pem"
SSLCertificateKeyFile "/etc/letsencrypt/live/yourdomain.com/privkey.pem"
SSLCertificateChainFile "/etc/letsencrypt/live/yourdomain.com/chain.pem"
SSLCACertificateFile "/etc/letsencrypt/live/yourdomain.com/fullchain.pem"
Recent Comments