Skip to content

Instantly share code, notes, and snippets.

@fabiomontefuscolo
Last active July 7, 2020 13:39
Show Gist options
  • Save fabiomontefuscolo/70ea4ebf0e16cd4e360f563ed60252f5 to your computer and use it in GitHub Desktop.
Save fabiomontefuscolo/70ea4ebf0e16cd4e360f563ed60252f5 to your computer and use it in GitHub Desktop.
Manual conf for LetsEncrypt on ClearOS with Apache
#!/bin/bash
#
# -rwxr-xr-x /etc/cron.daily/letsencrypt-renew
#
mkdir -p /var/www/letsencrypt
/usr/bin/certbot renew \
--agree-tos \
--register-unsafely-without-email \
--webroot \
-w /var/www/letsencrypt
/usr/sbin/apachectl configtest \
&& /usr/bin/systemctl restart httpd
#
# -rw-r--r-- /etc/httpd/conf.d/letsencrypt.conf
#
Alias /.well-known/acme-challenge/ "/var/www/letsencrypt/.well-known/acme-challenge/"
<Directory "/var/www/letsencrypt/">
AllowOverride None
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
Require method GET POST OPTIONS
</Directory>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment