Last active
August 11, 2016 07:44
-
-
Save anhtuank7c/e624143562f9267b74b0b1bf4af4fba3 to your computer and use it in GitHub Desktop.
Install Let's Encrypt, create cert, automatic renew cert for Apache Ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(setup ssl self-cert first https://www.digitalocean.com/community/tutorials/how-to-create-a-ssl-certificate-on-apache-for-ubuntu-14-04) | |
1) Install the Server Dependencies: | |
apt-get update | |
apt-get install git | |
2) Download the Let’s Encrypt Client: | |
git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt | |
3) Set Up the SSL Certificate: | |
./letsencrypt-auto --apache -d domain01.com -d www.domain01.com | |
./letsencrypt-auto --apache -d subdomain.domain01.com -d www.subdomain.domain01.com | |
etc.... | |
4) Set Up Auto Renewal: | |
crontab -e | |
Include the following content, all in one line: | |
30 2 * * 1 /opt/letsencrypt/letsencrypt-auto renew >> /var/log/letsencrypt/letsencrypt-renew.log | |
10 2 * * 1 cd /opt/letsencrypt && git pull >> /var/log/letsencrypt/letsencrypt-update.log | |
5) Updating the Let’s Encrypt Client (optional): | |
cd /opt/letsencrypt | |
git pull | |
6) Check ssl cert | |
https://www.ssllabs.com/ssltest/analyze.html?d=your_domain |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Attention:
Before apply LetsEncrypt, you have to generate local ssl key then add to the ssl virtualhost
If test sefl-sign cert ok => then going to install letsencrypt.