From 8b2e56c73ca7aaca52785fe228ca3b4401db3d82 Mon Sep 17 00:00:00 2001 From: ertopogo Date: Sat, 21 Feb 2026 03:50:58 +0100 Subject: feat: attributs bougies (metadata) + Caddy/DNS docs --- helper-cmd.md | 62 ++++++++++++++++++++++++++--------------------------------- 1 file changed, 27 insertions(+), 35 deletions(-) (limited to 'helper-cmd.md') diff --git a/helper-cmd.md b/helper-cmd.md index 7edef87..9b87ea2 100644 --- a/helper-cmd.md +++ b/helper-cmd.md @@ -282,9 +282,13 @@ curl http://localhost:8000 - `curl -I http://localhost:8000` ### 4.3 Test CORS -**Commande** +**Commande (public)** +``` +curl -i -H "Origin: https://lsb.arauco.online" https://api-lsb.arauco.online/store/products +``` +**Commande (LAN)** ``` -curl -i -H "Origin: http://:8000" http://:9000/store/products +curl -i -H "Origin: http://lsb.huitral.ruka.lan" http://api-lsb.huitral.ruka.lan/store/products ``` **Paramètres** - `-i` : inclut les en-têtes. @@ -294,62 +298,50 @@ curl -i -H "Origin: http://:8000" http://:9000/store/products - `curl -v ...` - DevTools navigateur (onglet Network). -## 5. Apache / Reverse proxy +## 5. Caddy / Reverse proxy (sur araucaria) -### 5.1 Statut Apache +Le reverse proxy est géré par Caddy sur `araucaria`, pas sur `huitral`. + +### 5.1 Statut Caddy **Commande** ``` -sudo systemctl status apache2 +sudo systemctl status caddy ``` -**Alternatives** -- `sudo service apache2 status` -### 5.2 Logs Apache +### 5.2 Logs Caddy **Commandes** ``` -sudo journalctl -u apache2 -f -sudo tail -f /var/log/apache2/error.log -sudo tail -f /var/log/apache2/access.log +sudo journalctl -u caddy -f +sudo journalctl -u caddy -n 200 --no-pager ``` **Paramètres** - `-f` : suivi temps réel. -**Alternatives** -- `journalctl -u apache2 -n 200 --no-pager` +### 5.3 Éditer le Caddyfile +**Commande** +``` +sudo nano /etc/caddy/Caddyfile +``` -### 5.3 Modules proxy -**Commandes** +### 5.4 Valider la config +**Commande** ``` -sudo a2enmod proxy -sudo a2enmod proxy_http +caddy validate --config /etc/caddy/Caddyfile ``` **Explication** -- active les modules de reverse proxy. +- vérifie la syntaxe avant rechargement. -**Alternatives** -- `a2enmod headers` -- `a2enmod rewrite` - -### 5.4 Reload Apache +### 5.5 Reload Caddy **Commande** ``` -sudo systemctl reload apache2 +sudo systemctl reload caddy ``` **Explication** - recharge la config sans couper les connexions actives. **Alternatives** -- `sudo service apache2 restart` - -### 5.5 Activer un vhost -**Commandes** -``` -sudo a2ensite lucien.conf -sudo apache2ctl configtest -sudo service apache2 restart -``` -**Paramètres** -- `configtest` : vérifie la syntaxe avant redémarrage. +- `sudo systemctl restart caddy` +- `caddy reload --config /etc/caddy/Caddyfile` ## 6. DNS / Résolution (Windows + Linux) -- cgit v1.2.3