Lets Encrypt免费ssl证书

2016-12-27 20:31
Debian系统:

先更新:
apt-get update
apt-get upgrade


安装certbot:

cd /root/
wget https://dl.eff.org/certbot-auto --no-check-certificate
chmod +x ./certbot-auto
./certbot-auto -n


生成证书:

./certbot-auto certonly --email admin@qiwu.org --agree-tos --webroot -w /var/www/qiwu.org -d www.qiwu.org


apache2配置证书:

SSLEngine on
SSLCertificateFile    /etc/letsencrypt/live/www.qiwu.org/fullchain.pem
SSLCertificateKeyFile  /etc/letsencrypt/live/www.qiwu.org/privkey.pem


自动续期(一天两次):

crontab -e

* */12 * * * /root/certbot-auto renew --renew-hook "/etc/init.d/apache2 reload"


最后更新:2016-12-27 20:32

0 条回复

说两句