summaryrefslogtreecommitdiff
path: root/helper-cmd.md
diff options
context:
space:
mode:
authorertopogo <erwin.t.pombett@gmail.com>2026-02-21 03:50:58 +0100
committerertopogo <erwin.t.pombett@gmail.com>2026-02-21 03:50:58 +0100
commit8b2e56c73ca7aaca52785fe228ca3b4401db3d82 (patch)
tree88c61c0629fc32499d8048d7878f493eb0936104 /helper-cmd.md
parentaa494fd8e24b0aabcc890655370a15358f9e6755 (diff)
feat: attributs bougies (metadata) + Caddy/DNS docs
Diffstat (limited to 'helper-cmd.md')
-rw-r--r--helper-cmd.md62
1 files changed, 27 insertions, 35 deletions
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://<IP>:8000" http://<IP>: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://<IP>:8000" http://<IP>: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)