Set up letsencrypt on linux

Its actually pretty easy:

Installing is helped with by https://certbot.eff.org/#debianjessie-apache

Make sure the webserver is running, then point certbot to the web root and add all the domains you want to get covered:

certbot certonly --webroot -w /var/www/spanischschulezurich.ch/ -d spanischschulezurich.ch -d www.spanischschulezurich.ch

For auto-renewal, at the following as a file into /etc/cron.daily/:

#!/bin/sh
certbot renew --post-hook "service apache2 restart"
# certbot renew --post-hook "service nginx restart"

Add the new certs to the web server config.

# Apache:
SSLCertificateFile /etc/letsencrypt/live/spanischschulezurich.ch/fullchain.pem  
SSLCertificateKeyFile /etc/letsencrypt/live/spanischschulezurich.ch/privkey.pem

# nginx:
ssl_certificate /etc/letsencrypt/live/spanischschulezurich.ch/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/spanischschulezurich.ch/privkey.pem;

Dont forget to restart the web servers.

Web Server Setup

Depending on the setup exlusions for the letsencrypt verification url have to be added.

Apache

add RewriteCond %{REQUEST_URI} !\.well-known/acme-challenge before every applicable RewriteRule in your virtual host or .htaccess config.