Install Let’s Encrypt on Apache

sudo apt-get update
sudo apt-get install python-letsencrypt-apache
sudo letsencrypt --apache -d
sudo letsencrypt --apache -d -d

sudo crontab -e

hit enter and then paste this at the bottom of the config , save and exit.

30 2 * * 1 /usr/bin/letsencrypt renew >> /var/log/le-renew.log

add this to the .htaccess for redirects

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$$1 [L,R=301]

RewriteCond %{HTTPS} off
RewriteRule ^(.*)$$1 [L,R=301]

Add your comment