From 7270ded3c5c5eb48defbdee16e13ab99145dc056 Mon Sep 17 00:00:00 2001 From: Nicholas Lamicela Date: Mon, 23 Dec 2024 13:53:06 -0800 Subject: [PATCH] start howto page --- content/howto.md | 61 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 content/howto.md diff --git a/content/howto.md b/content/howto.md new file mode 100644 index 0000000..811de06 --- /dev/null +++ b/content/howto.md @@ -0,0 +1,61 @@ +--- +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. \ No newline at end of file