Skip to content

Instantly share code, notes, and snippets.

@sandheepg
Last active July 17, 2017 18:36
Show Gist options
  • Save sandheepg/f47398bc44628f0272bae50076c4b8b7 to your computer and use it in GitHub Desktop.
Save sandheepg/f47398bc44628f0272bae50076c4b8b7 to your computer and use it in GitHub Desktop.
Setting up Lets Encrypt SSL on older versions of Ubuntu

The default “certbot” client will not work on older versions of Ubuntu because of outdated python and openssl versions. Here is a quick script that does the job. https://github.com/Neilpang/acme.sh

After installing the script, run

acme.sh --issue -d domain.in -d www.domain.in -w /var/www/document-root \
--certpath /etc/ssl/certs/domain.in.crt \
--keypath /etc/ssl/certs/domain.in.key \
--fullchainpath /etc/ssl/certs/intermediate.pem \
--reloadcmd  "service apache2 restart"

Add the following in Apache configuration file

SSLEngine on
SSLCertificateFile /etc/ssl/certs/domain.crt
SSLCertificateKeyFile /etc/ssl/certs/domain.key
SSLCertificateChainFile /etc/ssl/certs/intermediate.pem

Add acme.sh to crontab as described in its github page and restart Apache.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment