Skip to content

Instantly share code, notes, and snippets.

@stokito
Last active January 31, 2022 01:26
Show Gist options
  • Save stokito/5d0293a21d6c1af2c2b4434679ea5eee to your computer and use it in GitHub Desktop.
Save stokito/5d0293a21d6c1af2c2b4434679ea5eee to your computer and use it in GitHub Desktop.
Lighttpd How to Configure Let’s Encrypt TLS

Firts you need to enable mod_openssl

/usr/sbin/lighttpd-enable-mod ssl

Then edit /etc/lighttpd/conf-enabled/10-ssl.conf :

vi /etc/lighttpd/conf-enabled/10-ssl.conf

Adjust to:

ssl.pemfile := "/etc/letsencrypt/live/example.com/fullchain.pem"
ssl.privkey := "/etc/letsencrypt/live/example.com/privkey.pem"

and restart:

sudo service lighttpd restart

Note that the pemfile must be fullchain.pem and NOT just cert.pem Otherwise while in browser all works you'll get and errors on connection:

wget: ERROR: cannot verify certificate, issued by 'CN=R3,O=Let's Encrypt,C=US' Unable to locally verify the issuer's authority

curl: SSL certificate problem: unable to get local issuer certificate curl: (60) SSL certificate problem: unable to get local issuer certificate

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