Tags

,

1. Make sure python and git are installed

sudo apt-get install git python

2. Download the LetsEncrypt client from git

git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt

3. Turn off apache temporarily for the installation process:

sudo /etc/init.d/apache2 start

4. Run letsencrypt to generate certificate

sudo ./letsencrypt-auto certonly --standalone --agree-tos --redirect --duplicate --text --email fakrul@fakrul.com -d df-h.net -d www.df-h.net

5. Enable SSL for apache

sudo a2enmod ssl

6. Add the certificate and key file

vi /etc/apache2/sites-available/default-ssl

SSLCertificateFile   /etc/letsencrypt/live/df-h.net/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/keys/0002_key-letsencrypt.pem

7. Soft link the ssl

ln -s /etc/apache2/sites-available/default-ssl /etc/apache2/sites-enabled/default-ssl

8. Reload apache to take effect

apache2ctl start

Screen Shot 2015-12-18 at 12.18.19 PM

To auto renew you certificate do the followings:

mv /home/fakrul/letsencrypt/ /opt
cd /opt/letsencrypt/
chmod 755 letsencrypt-auto

crontab -l

30 2 * * 1 /opt/letsencrypt/letsencrypt-auto renew >> /var/log/le-renew.log

For details : https://letsencrypt.org