Post

🧪 Jekyll thème chirpy

Jekyll thème chirpy

🧪jekyll-theme-chirpy

Prérequis

Installer git et imagemagick

1
sudo apt install git imagemagick

Cloner dépôt jekyll-theme-chirpy

Sur le home

1
2
3
4
5
cd ~
git clone https://github.com/cotes2020/jekyll-theme-chirpy.git chirpy
# initialiser le dépôt
cd ~/chirpy
bash tools/init.sh

Changement de logo
Si vous avez un fichier svg comme logo (ex: logo_new.svg), il faut regénérer les fichiers

Prérequis utilitaire imagemagick installé

1
2
# on efface l'existant
rm ~/chirpy/assets/img/favicons/

Copier le fichier svg dans le dossier ~/chirpy/assets/img/favicons/ et exécuter ce qui suit

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# A partir d'une image svg
# exemple logo_new.svg
SVG=logo_new.svg
magick $SVG -resize 512x512 android-chrome-512x512.png
magick $SVG -resize 512x512 web-app-manifest-192x192.png
magick $SVG -resize 512x512 web-app-manifest-512x512.png
magick $SVG -resize 192x192 android-chrome-512x512.png
magick $SVG -resize 192x192 android-chrome-192x192.png
magick $SVG -resize 16x16 favicon-16x16.png
magick $SVG -resize 32x32 favicon-32x32.png
magick $SVG -resize 96x96 favicon-96x96.png
magick $SVG -resize 150x150 mstile-150x150.png
magick $SVG -resize 180x180 apple-touch-icon.png
magick $SVG favicon.ico

Retour racine

1
cd ~/chirpy

Modifier les sources

  • Commenter _includes/post-sharing.html
  • Modifier "content": dans le fichier assets/js/data/search.json pour limiter la taille finale du search.json

Le fichier de configuration _config.yml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# The Site Configuration

# Import the theme
theme: jekyll-theme-chirpy

# The language of the webpage › http://www.lingoes.net/en/translator/langcode.htm
# If it has the same name as one of the files in folder `_data/locales`, the layout language will also be changed,
# otherwise, the layout language will use the default value of 'en'.
lang: fr-FR

# Change to your timezone › https://zones.arilyn.cc
timezone: Europe/Paris

# jekyll-seo-tag settings › https://github.com/jekyll/jekyll-seo-tag/blob/master/docs/usage.md
# ↓ --------------------------

title: Yannig # the main title

tagline: Tutoriels # it will display as the subtitle

description: >- # used by seo meta and the atom feed
  Un thème Jekyll minimal, réactif et riche en fonctionnalités pour l’écriture technique.

# Fill in the protocol & hostname for your site.
# E.g. 'https://username.github.io', note that it does not end with a '/'.
url: "https://chirpy.rnmkcy.eu"

social:
  # Change to your full name.
  # It will be displayed as the default author of the posts and the copyright owner in the Footer
  links: ""
  name: Yannig

# ↑ --------------------------
# The end of `jekyll-seo-tag` settings


# Prefer color scheme setting.
#
# Note: Keep empty will follow the system prefer color by default,
# and there will be a toggle to switch the theme between dark and light
# on the bottom left of the sidebar.
#
# Available options:
#
#     light — Use the light color scheme
#     dark — Use the dark color scheme
#
theme_mode: # [light | dark]

# The CDN endpoint for media resources.
# Notice that once it is assigned, the CDN url
# will be added to all media resources (site avatar, posts' images, audio and video files) paths starting with '/'
#
# e.g. 'https://cdn.com'
cdn:

# the avatar on sidebar, support local or CORS resources
avatar: /assets/img/favicons/favicon-96x96.png

# boolean type, the global switch for TOC in posts.
toc: true


# Self-hosted static assets, optional › https://github.com/cotes2020/chirpy-static-assets
assets:
  self_host:
    enabled: # boolean, keep empty means false
    # specify the Jekyll environment, empty means both
    # only works if `assets.self_host.enabled` is 'true'
    env: # [development | production]

pwa:
  enabled: true # The option for PWA feature (installable)
  cache:
    enabled: true # The option for PWA offline cache
    # Paths defined here will be excluded from the PWA cache.
    # Usually its value is the `baseurl` of another website that
    # shares the same domain name as the current website.
    deny_paths:
      # - "/example"  # URLs match `<SITE_URL>/example/*` will not be cached by the PWA

paginate: 50

# The base URL of your site
baseurl: ""

# Gestion dossiers et fichiers sans front-matter
markdown_folders:
  dirs: [_notes]         # plusieurs dossiers possibles, ils sont fusionnés dans une seule arborescence
  base_url: /notes
  root_title: Notes      # titre de l'index racine
  breadcrumb: true       # fil d'Ariane dans le contenu
  sort: alpha            # ordre initial : alpha | recent
  sort_switch: true      # affiche les boutons de tri sur les index
  defaults:
    layout: page

# ------------ The following options are not recommended to be modified ------------------

kramdown:
  footnote_backlink: "&#8617;&#xfe0e;"
  syntax_highlighter: rouge
  syntax_highlighter_opts: # Rouge Options › https://github.com/jneen/rouge#full-options
    css_class: highlight
    # default_lang: console
    span:
      line_numbers: false
    block:
      line_numbers: true
      start_line: 1

collections:
  tabs:
    output: true
    sort_by: order

defaults:
  - scope:
      path: "" # An empty string here means all files in the project
      type: posts
    values:
      layout: post
      comments: true # Enable comments in posts.
      toc: true # Display TOC column in posts.
      # DO NOT modify the following parameter unless you are confident enough
      # to update the code of all other post links in this project.
      permalink: /posts/:title/
  - scope:
      path: _drafts
    values:
      comments: false
  - scope:
      path: ""
      type: tabs # see `site.collections`
    values:
      layout: page
      permalink: /:title/

sass:
  style: compressed

compress_html:
  clippings: all
  comments: all
  endings: all
  profile: false
  blanklines: false
  ignore:
    envs: [development]

exclude:
  - "*.gem"
  - "*.gemspec"
  - docs
  - tools
  - README.md
  - LICENSE
  - purgecss.js
  - "*.config.js"
  - "package*.json"

jekyll-archives:
  enabled: [categories, tags]
  layouts:
    category: category
    tag: tag
  permalinks:
    tag: /tags/:name/
    category: /categories/:name/

Jekyll build

Jekyll est installé sur la machine vm105 (192.168.0.229)

Les dossiers concernés par jekyll sont sur le serveur debian cwwk (192.168.0.205)

1
2
3
4
/sharenfs/media/statique/
├── files
├── images
└── _posts

Le serveur cwwk a accès à la machine vm105 (ssh debjek@192.168.0.229 -p 55229 -i /home/yick/.ssh/vm-105)

Créer un systemd.path qui surveille toute création,modification ou effacement de fichier sur les dossiers /sharenfs/media/statique/{files,images,_posts} Le service associé effectue une synchronistation via rsync des dossiers /sharenfs/media/statique/{files,images,_posts} vers /home/debjek/chirpy/{files,images,_posts}

Création des dossiers files, images et _posts pour le générateur de site

1
mkdir -p  $HOME/chirpy/{files,images,_posts}

Synchronisation des dossiers avec le partage NFS /sharenfs: rsync_path.sh

1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash

rsync -av --delete \
  /sharenfs/media/statique/_posts/ \
  /home/debjek/chirpy/_posts/

rsync -av \
  /sharenfs/media/statique/files/ \
  /home/debjek/chirpy/files/

rsync -av \
  /sharenfs/media/statique/images/ \
  /home/debjek/chirpy/images/

Exécution

1
2
chmod +x rsync_path.sh 
./rsync_path.sh 

Générer _site (défaut)

Par défaut jekyll build génère le dossier _site

A-Option build

Construction du dossier _site

1
2
cd ~/chirpy
bundle exec jekyll build

B-Option serveur

1
2
cd ~/chirpy
bundle exec jekyll serve

C-Option build sur /sharenfs

1
bundle exec jekyll build --destination /sharenfs/rnmkcy/chirpy

On utilise pour cela la commande bundle pour que la version de jekyll utilisée ainsi que celle des dépendances soient bien celles décrites dans les fichiers Gemfile et Gemfile.lock et ne dépendent pas de l’environnement de la machine.

Le serveur est lancé

1
2
3
4
5
6
7
8
9
10
Configuration file: /home/jek/jekyll-theme-chirpy/_config.yml
 Theme Config file: /home/jek/jekyll-theme-chirpy/_config.yml
            Source: /home/jek/jekyll-theme-chirpy
       Destination: /home/jek/jekyll-theme-chirpy/_site
 Incremental build: disabled. Enable with --incremental
      Generating... 
                    done in 59.712 seconds.
 Auto-regeneration: enabled for '/home/jek/jekyll-theme-chirpy'
    Server address: http://127.0.0.1:4000/
  Server running... press ctrl-c to stop.

Accès redirection

Depuis un terminal du desktop PC ou Laptop
Accès à la page par une redirection, lancer la commande depuis un terminal du réseau

1
2
# avec fichier clé
ssh -L 9500:localhost:4000 debjek@192.168.0.229 -p 55229 -i /home/yann/.ssh/vm-105

Navigateur local: http://localhost:9500

Service Chirpy

Le service chirpy avec la commande jekyll serve --incremental --watch qui lance un serveur local sur le port 4000 avec Jekyll, en mode incrémental (reconstruit uniquement les fichiers modifiés) et avec un watcher pour détecter les changements de fichiers.

Créer le dossier systemd utilisateur

1
mkdir -p ~/.config/systemd/user

Création fichier ~/.config/systemd/user/chirpy.service :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
[Unit]
Description=Jekyll site for Chirpy (static build)
After=network-online.target sharenfs.mount
Wants=network-online.target sharenfs.mount

[Service]
Type=simple

# Répertoire du site
WorkingDirectory=%h/chirpy

# Environnement Ruby / gems
Environment="PATH=/home/debjek/gems/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
Environment="GEM_HOME=/home/debjek/gems"
Environment="GEM_PATH=/home/debjek/gems"

# Lancement de Jekyll
ExecStart=/home/debjek/gems/bin/jekyll serve --incremental --watch --host 0.0.0.0 --port 4000

# Demande à systemd d'envoyer SIGINT (comme Ctrl-C)
KillSignal=SIGINT

# Si jamais Jekyll sort avec un code non‑zéro sur SIGINT,
# on considère quand même que c'est un succès (adapter si besoin).
SuccessExitStatus=0 1 130

# Politique de redémarrage
Restart=always
RestartSec=5

[Install]
WantedBy=default.target

Commentaires :

  • KillSignal=SIGINT fait que systemctl --user stop chirpy.service enverra SIGINT plutôt que SIGTERM, ce qui est souvent mieux géré par les applis type serveur.
  • SuccessExitStatus=0 1 130 dit à systemd : “codes 0, 1, 130 ne sont pas des échecs”, ce qui couvre les cas courants (0 = ok, 130 = Ctrl‑C, 1 = exit après SignalException).

Après modification :

1
2
3
systemctl --user daemon-reload
systemctl --user enable chirpy.service
systemctl --user restart chirpy.service

Vérifier :

1
2
systemctl --user status chirpy.service
journalctl --user -u chirpy.service -f

Activer le démarrage des services systemd user même après fermeture de session, pour l’utilisateur $USER.

1
sudo loginctl enable-linger $USER

Script Rebuild chirpy

Script qui recrée entièrement le site statique jekyll build, puis synchronise _site avec les sites distants puis redémarre le service chirpy

Créer un script pour un rebuild complet: /usr/local/bin/rebuild-chirpy.sh

  • arrêt propre du service (en réutilisant ta boucle d’attente)
  • jekyll build via le binaire du GEM (comme dans ton service)
  • un peu de robustesse sur rsync.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/env bash
set -euo pipefail

SERVICE_NAME="chirpy.service"
PATH_NAME="chirpy-rsync.path"
SITE_DIR="$HOME/chirpy"
JEKYLL_BIN="/home/debjek/gems/bin/jekyll"
RSYNC_SRC="/home/debjek/chirpy/_site/"
RSYNC_DEST="yick@192.168.0.205:/sharenfs/rnmkcy/chirpy/"
SSH_OPTS="-p 55205 -i /home/debjek/.ssh/cwwk-ed25519 -o StrictHostKeyChecking=accept-new"

echo "[$(date '+%F %T')] Passage dans $SITE_DIR"
cd "$SITE_DIR"

export PATH="/home/debjek/gems/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
export GEM_HOME="/home/debjek/gems"
export GEM_PATH="/home/debjek/gems"

echo "[$(date '+%F %T')] Arrêt path utilisateur $PATH_NAME"
systemctl --user stop "$PATH_NAME" || true

echo "[$(date '+%F %T')] Arrêt service utilisateur $SERVICE_NAME"
systemctl --user stop "$SERVICE_NAME" || true

echo "[$(date '+%F %T')] Attente que $SERVICE_NAME soit vraiment stoppé"
for _ in {1..30}; do
  if systemctl --user is-active --quiet "$SERVICE_NAME"; then
    sleep 1
  else
    break
  fi
done
echo "[$(date '+%F %T')] Supprimer dossier _site"
sudo rm -r /home/debjek/chirpy/_site

echo "[$(date '+%F %T')] Construction: jekyll build"
"$JEKYLL_BIN" build

echo "[$(date '+%F %T')] Démarrage path utilisateur $PATH_NAME"
systemctl --user start "$PATH_NAME" || true

echo "[$(date '+%F %T')] Démarrage service utilisateur $SERVICE_NAME"
systemctl --user start "$SERVICE_NAME" || true

echo "[$(date '+%F %T')] Fin $0"

exit 0

echo "[$(date '+%F %T')] rsync vers $RSYNC_DEST"
echo "rsync -a --delete -e \"ssh $SSH_OPTS\" \"$RSYNC_SRC\" \"$RSYNC_DEST\""
rsync -a --delete -e "ssh $SSH_OPTS" "$RSYNC_SRC" "$RSYNC_DEST"

Points importants

  • J’utilise "$JEKYLL_BIN" build pour être sûr d’utiliser le même Jekyll que celui du service systemd (binaire dans le GEM_HOME).
  • La commande rsync est inchangée dans son comportement, juste légèrement factorisée dans des variables pour faciliter les futurs changements.
  • Les timestamps dans les echo aident à voir où ça passe du temps si un jour le build ou le rsync devient long.

Rendre exécutable

1
2
sudo chmod +x /usr/local/bin/rebuild-chirpy.sh
rebuild-chirpy.sh

Synchro site - systemd path et rsync

Le but est de synchroniser le dossier local ~/chirpy/_site/ avec le(s) serveur(s) web distant(s)
A chaque création, modification ou suppression d’un POST mardown le sous-dossier _site/ est reconstruit (jekyll build)
Avec les unités de chemin, vous pouvez surveiller les fichiers et les répertoires pour certains événements. Si un événement spécifique se produit, une unité de service est exécutée, et elle porte généralement le même nom que l’unité de chemin
Nous allons surveiller dans le dossier local $HOME/chirpy/_site/ toute modification du fichier sitemap.xml qui entrainera l’exécution d’un script

Clés SSH pour les sites distants

A-Infomaniak

  • Utilisateur: yiak
  • IP: 83.228.219.134
  • Port: 55134

Générer un jeu de clé pour le poste distant infomaniak

1
ssh-keygen -t ed25519 -o -a 100 -f ~/.ssh/infomaniak

Ajouter le contenu de la clé publique infomaniak.pub au fichier ~/.ssh/authorized_keys du distant infomaniak

1
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDhMRZfsByGlIAFiP9PkzqMPgzsK0yH+RdUjNEV6qtkS debjek@debian

Tester la connexion ssh

1
ssh yiak@83.228.219.134 -p 55134 -i .ssh/infomaniak

B-Refaire les mêmes opérations pour les autres sites distants

Générer un jeu de clé pour le poste distant contabo

1
ssh-keygen -t ed25519 -o -a 100 -f ~/.ssh/contabo

Ajouter le contenu de la clé publique contabo.pub au fichier ~/.ssh/authorized_keys du distant contabo

1
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICWCMgQIyXNeVIMYLMzmUPzNaMJRwbEU4Jin/BZ5HURZ debjek@debian

Tester la connexion ssh

1
ssh yair@144.91.89.149 -p 55149 -i .ssh/contabo

Systemd Path chirpy-rsync (user)

Dans le répertoire systemd utilisateur créer une unité de cheminement ~/.config/systemd/user/chirpy-rsync.path

1
2
3
4
5
6
7
8
9
[Unit]
Description=Surveiller sitemap.xml pour les changements

[Path]
PathChanged=/home/debjek/chirpy/_site/sitemap.xml
Unit=chirpy-rsync.service

[Install]
WantedBy=default.target

Dans la section [Path], PathChanged= indique le chemin absolu du fichier à surveiller, tandis que Unit= indique l’unité de service à exécuter si le fichier change. Cette unité (chirpy-rsync.path) doit être lancée lorsque le système est en mode multi-utilisateur.

Service systemd chirpy-rsync (user)

Créer l’unité de service correspondante, chirpy-rsync.service, dans le répertoire ~/.config/systemd/user/
Si le fichier sitemap.xml change (c’est-à-dire qu’il est à la fois écrit et fermé), l’unité de service suivante sera appelée pour exécuter le script spécifié : Créer ~/.config/systemd/user/chirpy-rsync.service :

1
2
3
4
5
6
[Unit]
Description=Sync Jekyll _site to remote servers with rsync

[Service]
Type=oneshot
ExecStart=/usr/local/bin/chirpy-rsync-sync.sh

Script synchro chirpy-rsync-sync.sh

Créer /usr/local/bin/chirpy-rsync-sync.sh (via sudo)

1
2
3
4
#!/usr/bin/env bash
# Distant cwwk
echo 'rsync cwwk'
rsync -a --delete -e "ssh -p 55205 -i /home/debjek/.ssh/cwwk -o StrictHostKeyChecking=accept-new"  /home/debjek/chirpy/_site/ yick@192.168.0.205:/sharenfs/rnmkcy/chirpy/

Puis :

1
sudo chmod +x /usr/local/bin/chirpy-rsync-sync.sh

Activer/démarrer :

1
2
systemctl --user daemon-reload
systemctl --user enable --now chirpy-rsync.path

Vérifier

1
2
systemctl --user status chirpy-rsync.path
journalctl --user -u chirpy-rsync.service -f

PC1 Linux Desktop

Créer un fichier desktop $HOME/.local/share/applications/Build\ Chirpy.desktop

Argument ligne de commande: -rv -geometry 120x20+10+20 -T build_chirpy_site -e /home/yann/scripts/build_chirpy_site.sh

$HOME/.local/share/applications/Build\ Chirpy.desktop

1
2
3
4
5
6
7
8
9
10
11
12
13
14
[Desktop Entry]
Comment=build_chirpy_site.sh
Exec=xterm -rv -geometry 300x20 -T build_chirpy_site -e /home/yann/scripts/build_chirpy_site.sh
Icon=project_rebuild-symbolic
Name=build_chirpy_site
NoDisplay=false
Path=
PrefersNonDefaultGPU=false
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-KDE-SubstituteUID=false
X-KDE-Username=

Le script /home/yann/scripts/build_chirpy_site.sh

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash

SESSION="build_chirpy_site"
WIN="lxcTerm"
SVC="surveiller-media.service"

# On supprime la session si elle existe déjà
if tmux has-session -t "$SESSION" 2>/dev/null; then
    tmux kill-session -t "$SESSION"
fi

# Créer session + fenêtre
tmux new-session -d -s "$SESSION" -n "$WIN"

# Séparation en 2 panneaux (haut / bas)
# | 0 |
# |---|
# | 1 |
tmux split-window -v -l 50% -t "$SESSION:$WIN.0"

# Panneau HAUT : logs du service local
tmux send-keys -t "$SESSION:$WIN.0" "journalctl --user -u $SVC -f" C-m

# Panneau BAS : logs de chirpy sur vm105
tmux send-keys -t "$SESSION:$WIN.1" "/home/yann/scripts/ssh-manager.sh vm105 exe 'journalctl --user -u chirpy -f'" C-m

# Boutons cliquables dans la barre d'état (tmux >= 3.3)
tmux set -t "$SESSION" mouse on
tmux set -t "$SESSION" status-right-length 40
tmux set -t "$SESSION" status-right \
  "#[range=user|svc-start,bg=green,fg=black] ▶ START #[norange default] #[range=user|svc-stop,bg=red,fg=white] ■ STOP #[norange default]"

# Clic sur un bouton -> systemctl ; sinon comportement par défaut
tmux bind -n MouseDown1Status if -F '#{==:#{mouse_status_range},svc-start}' \
  "run-shell -b 'systemctl --user start $SVC'" \
  "if -F '#{==:#{mouse_status_range},svc-stop}' \
     \"run-shell -b 'systemctl --user stop $SVC'\" \
     'select-window -t='"

# Raccourcis clavier de secours
tmux bind -n F5 run-shell -b "systemctl --user start $SVC"
tmux bind -n F6 run-shell -b "systemctl --user stop $SVC"

# Afficher la session
tmux attach -t "$SESSION"

KDE - Configurer les paramètres spécifiques de la fenêtre

Alias chirpy Pour reconstruire,alias chirpy

1
alias chirpy='/home/yann/scripts/ssh-manager.sh vm105 exe '\''/usr/local/bin/rebuild-chirpy.sh'\'''

CWWK - chirpy.rnmkcy.eu

A-Static nginx (ACTIF)

Fichier de configuration /etc/nginx/conf.d/chirpy.rnmkcy.eu.conf sur le serveur cwwk debian 13

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
server {
    listen 443 ssl;
    listen [::]:443 ssl;
    http2 on;
    server_name chirpy.rnmkcy.eu;

    include /etc/nginx/conf.d/ssl-modern.inc;

    root /sharenfs/rnmkcy/chirpy;
    index index.html;

    location / {
        try_files $uri $uri/ /index.html;
    }

    location ~* \.(css|js|mjs|png|jpg|jpeg|gif|svg|ico|woff|woff2|ttf|map)$ {
        expires 30d;
        add_header Cache-Control "public, immutable";
        access_log off;
    }

    location ~ /\. {
        deny all;
    }
}

B-Proxy nginx

Fichier de configuration /etc/nginx/conf.d/chirpy.rnmkcy.eu.conf sur le serveur cwwk debian 13

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
server {
    listen 443 ssl;
    listen [::]:443 ssl;
    http2 on;
    server_name chirpy.rnmkcy.eu;

    include /etc/nginx/conf.d/ssl-modern.inc;
    # Headers de sécurité au niveau server
    include /etc/nginx/snippets/security-headers.conf;
location / {
    proxy_pass http://192.168.0.229:4000;
    proxy_http_version 1.1;

    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;

    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
 }

}

🔷Chirpy site statique dossier ‘notes’

Cet article est sous licence CC BY 4.0 par l'auteur.