ubuntu
sudo apt-get update sudo add-apt-repository ppa:certbot/certbot sudo apt-get update sudo apt-get install certbot sudo service nginx stop sudo certbot certonly --standalone --email your@email.com -d yourdomain.com sudo service nginx start
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;