ubuntu
sudo apt-get update
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install certbot
service nginx stop
certbot certonly --standalone --email [email protected] -d yourdomain.com
centOs
yum install -y epel-release yum install -y certbot
如果报AttributeError: ‘X509‘ object has no attribute ‘_x509‘
解决方案:http://blog.csdn.net/default7/article/details/78546186
nginx
ssl_certificate /etc/letsencrypt/live/123456.cloud/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/123456.cloud/privkey.pem;