Skip to content

Instantly share code, notes, and snippets.

@gtrabanco
Created June 16, 2017 16:08
Show Gist options
  • Save gtrabanco/3fe25386be09b76fbb9d0a407c8b11da to your computer and use it in GitHub Desktop.
Save gtrabanco/3fe25386be09b76fbb9d0a407c8b11da to your computer and use it in GitHub Desktop.
Generate a new Let's Encrypt certificate
#!/usr/bin/env bash
LETSENCRYPT_BIN="/opt/certbot/certbot-auto
$LETSENCRYPT_BIN certonly --renew-by-default -a webroot --webroot-path=/var/www/letsencrypt \
--agree-tos --staple-ocsp --hsts \
-d example.com,www.example.com \
-d sub.example.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment