letsencrypt

需求
python2.7
pip
virtualenv

git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt
./letsencrypt-auto certonly --server https://acme-v01.api.letsencrypt.org/directory --agree-dev-preview

按提示输入对应内容后,会生成证书,会提示目录。

/etc/letsencrypt/live/域名

4个文件

cert.pem  chain.pem  fullchain.pem  privkey.pem

nginx的话增加

listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/域名/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/域名/privkey.pem;