Lets Encrypt on Turnkey Linux LAMP

6th February 2017
by InfiniteMonkeys

How to encrypt your sites with Let’s Encrypt on Turnkey Linux LAMP 14.1

Mileage may vary..

 

Add the repo:
vi /etc/apt/sources.list
“deb http://ftp.debian.org/debian jessie-backports main”

Get the Certbot:
cd && wget https://dl.eff.org/certbot-auto
chmod a+x certbot-auto

Get an SSL with the domain “cloudmonkey.co.uk” and the site domain “www.cloudmonkey.co.uk”:
cd && ./certbot-auto certonly -d cloudmonkey.co.uk -d www.cloudmonkey.co.uk

Set Cron to check for a new SSL twice per day:
crontab -e
0 0 * * * cd && ./certbot-auto renew –quiet –no-self-upgrade
0 12 * * * cd && ./certbot-auto renew –quiet –no-self-upgrade

Edit your sites virtual host to add:
vi /etc/apache2/sites-available/www.cloudmonkey.co.uk.conf

<VirtualHost *:443>
DocumentRoot *
ServerName www.cloudmonkey.co.uk
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/cloudmonkey.co.uk/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/cloudmonkey.co.uk/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/cloudmonkey.co.uk/fullchain.pem
And lastly restart Apache:
service apache2 restart

HTTPS CMKY Logo

Leave a Comment

You must be logged in to post a comment.