start howto page
This commit is contained in:
parent
8ef255b32f
commit
7270ded3c5
1 changed files with 61 additions and 0 deletions
61
content/howto.md
Normal file
61
content/howto.md
Normal file
|
@ -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
|
||||||
|
<VirtualHost *:80 *:443>
|
||||||
|
ServerName example.net
|
||||||
|
SSLEngine on
|
||||||
|
Include /etc/letsencrypt/options-ssl-apache.conf
|
||||||
|
|
||||||
|
Header always add Strict-Transport-Security: "max-age=31536000"; includeSubDomains; preload;"
|
||||||
|
<If "%{HTTPS} == 'off'">
|
||||||
|
<If "%{HTTP:Upgrade-Insecure-Requests} == 1">
|
||||||
|
Header always add Vary: Upgrade-Insecure-Requests
|
||||||
|
Redirect / https://example.net
|
||||||
|
</If>
|
||||||
|
</If>
|
||||||
|
|
||||||
|
DocumentRoot /data/example.net/site
|
||||||
|
ErrorDocument 404 404.html
|
||||||
|
|
||||||
|
<Directory />
|
||||||
|
Options FollowSymLinks MultiViews
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
SSLCertificateFile /etc/letsencrypt/live/example.net/fullchain.pem
|
||||||
|
SSLCertificateKeyFile /etc/letsencrypt/live/example.net/privkey.pem
|
||||||
|
</VirtualHost>
|
||||||
|
|
||||||
|
<VirtualHost *:443>
|
||||||
|
ServerName git.example.net
|
||||||
|
SSLEngine on
|
||||||
|
Include /etc/letsencrypt/options-ssl-apache.conf
|
||||||
|
|
||||||
|
# https://stackoverflow.com/a/9933890/3821202
|
||||||
|
AllowEncodedSlashes NoDecode
|
||||||
|
<Location />
|
||||||
|
ProxyPass http://localhost:8100/ nocanon
|
||||||
|
</Location>
|
||||||
|
SSLCertificateFile /etc/letsencrypt/live/example.net/fullchain.pem
|
||||||
|
SSLCertificateKeyFile /etc/letsencrypt/live/example.net/privkey.pem
|
||||||
|
</VirtualHost>
|
||||||
|
```
|
||||||
|
|
||||||
|
Last updated 2024-12-23.
|
Loading…
Reference in a new issue