Skip to content

Instantly share code, notes, and snippets.

@robpataki
Last active November 8, 2017 09:32
Show Gist options
  • Save robpataki/88fcff4927e0f7ded90f4e7148b10de2 to your computer and use it in GitHub Desktop.
Save robpataki/88fcff4927e0f7ded90f4e7148b10de2 to your computer and use it in GitHub Desktop.
SSL certificate notes

SSL certificates on Linode instance

Use certbot

Auto renew certificates

./certbot-auto renew --dry-run
...
./certbot-auto renew --quiet --no-self-upgrade

Create a new certificate

$ ./certbot-auto --apache

Notes

DON'T FORGET TO CREATE A BACKUP OF THE CERTIFICATIONS WHEN THEY'RE DONE. JUST IN CASE YOU KNOW :)

To redirect WWW to non-WWW: add this to the .htaccess file:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment