Skip to content

Instantly share code, notes, and snippets.

@mindc
Last active August 21, 2017 07:18
Show Gist options
  • Save mindc/6d080bd37b7f1726aea5179716b2eccf to your computer and use it in GitHub Desktop.
Save mindc/6d080bd37b7f1726aea5179716b2eccf to your computer and use it in GitHub Desktop.
Lighttpd and Certbot (automated)

Lighttpd and Certbot

/etc/letscrypt/cli.ini

sa-key-size = 4096
authenticator = webroot
webroot-path = /home/certbot
renew-hook = /home/certbot/renew-hook.sh
post-hook = /home/certbot/post-hook.sh

/home/certbot/renew-hook.sh

#!/bin/sh
cat $RENEWED_LINEAGE/privkey.pem $RENEWED_LINEAGE/cert.pem > $RENEWED_LINEAGE/ssl.pem

/home/certbot/post-hook.sh

#!/bin/sh
/etc/init.d/lighttpd restart

/etc/lighttpd/conf-enabled/10-certbot.conf

server.modules += (
    "mod_alias"
)

alias.url += (
    "/.well-known/" => "/home/certbot/.well-known/"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment