Let’s encrypt 证书快速生成脚本

网站的Let’s encrypt证书快到期了,看了官方的续期方法比较繁琐,于是在网上找了找简单方便做法,结果找到了墓地小企鹅写的一个脚本(shell script),使用这个脚本可以方便的生成以及更新Let’s encrypt 证书。 脚本地址 https://github.com/xdtianyu/scripts/tree/master/lets-encrypt 下载脚本 wget https://raw.githubusercontent.com/xdtianyu/scripts/master/lets-encrypt/letsencrypt.conf wget https://raw.githubusercontent.com/xdtianyu/scripts/master/lets-encrypt/letsencrypt.sh 配置 root@rnse:~/lesh# cat letsencrypt.conf # only modify the values, key files will be generated automaticly. ACCOUNT_KEY="letsencrypt-account.key" DOMAIN_KEY="alair.key" DOMAIN_DIR="/data/wwwroot/alair.cn/compiled" DOMAINS="DNS:alair.cn,DNS:www.alair.cn" #ECC=TRUE #LIGHTTPD=TRUE 按照需要自定义DOMAIN_KEY、DOMAIN_DIR、DOMAINS三部分。 生成证书 root@rnse:~/lesh#chmod +x letsencrypt.sh root@rnse:~/lesh# ./letsencrypt.sh letsencrypt.conf Generate account key… Generating RSA private key, 4096 bit long modulus …………………………++ ….++ e is 65537 (0x10001) Generate domain key… Generating RSA private key, 2048 bit long modulus .
全文 →

使用免费Let’s Encrypt证书

在此介绍如何使用Let’s Encrypt的免费SSL证书,需要在有管理权限的VPS上操作,然后参考以下方法自签域名证书。 git clone https://github.com/letsencrypt/letsencrypt.git cd letsencrypt mkdir -p /home/webroot/.well-known/acme-challenge #/home/webroot为网站目录 ./letsencrypt-auto certonly –email me@alair.cn -d alair.cn,www.alair.cn –webroot -w /home/webroot –agree-tos #注意email、域名、和网站目录 签发成功后,会提示如/etc/letsencrypt/live/www.alair.cn/fullchain.pem;的证书路径信息。 IMPORTANT NOTES: - Congratulations! Your certificate and chain have been saved at /etc/letsencrypt/live/www.alair.cn/fullchain.pem. Your cert will expire on 2016-03-14. To obtain a new version of the certificate in the future, simply run Let’s Encrypt again. - If like Let’s Encrypt, please consider supporting our work by: Donating to ISRG / Let’s Encrypt: https://letsencrypt.
全文 →