--- layout: layouts/base.njk title: How to self-host a blog with 11ty, git, and Decap CMS --- # {{ title }} Server: debian ## Apache Install apache2 ```sh apt install apache2 ``` Config file ```conf # https://palmure.fr/blog.html#default-https-but-only-for-recent-browsers ServerName example.net SSLEngine on Include /etc/letsencrypt/options-ssl-apache.conf Header always add Strict-Transport-Security: "max-age=31536000"; includeSubDomains; preload;" Header always add Vary: Upgrade-Insecure-Requests Redirect / https://example.net DocumentRoot /data/example.net/site ErrorDocument 404 404.html Options FollowSymLinks MultiViews Require all granted SSLCertificateFile /etc/letsencrypt/live/example.net/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/example.net/privkey.pem ServerName git.example.net SSLEngine on Include /etc/letsencrypt/options-ssl-apache.conf # https://stackoverflow.com/a/9933890/3821202 AllowEncodedSlashes NoDecode ProxyPass http://localhost:8100/ nocanon SSLCertificateFile /etc/letsencrypt/live/example.net/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/example.net/privkey.pem ``` Last updated 2024-12-23.