# OPTIM-05 — Audit web server + HTTP/2

**Date** : 2026-06-24
**Source** : rapport Lighthouse `toulouse-les-orgues.org-20260624T121514.json` (Perf 66/100) + audit config Apache.

## Audit config Apache
| Point | État |
|-------|------|
| **HTTP/2** | 🔴→✅ Était **HTTP/1.1** (`modern-http-insight`=0). `mod_http2` présent mais non chargé. **Activé** (`a2enmod http2`). |
| TLS | ✅ TLS 1.2/1.3, ciphers ECDHE/GCM/CHACHA20, **HSTS preload** |
| Compression | ✅ Brotli + gzip (deflate) |
| Cache statique | ✅ `Cache-Control: immutable` + Expires (1 an médias) |
| Headers sécurité | ✅ CSP, X-Frame, X-Content-Type, Referrer-Policy, X-Powered-By unset |
| Bannières | ✅ `ServerTokens Prod`, `ServerSignature Off` |
| Process model | ✅ `mpm_event` + PHP-FPM |
| **OCSP Stapling** | 🟡 Absent — gain TLS mineur (proposé, non appliqué) |

## HTTP/2 — appliqué
- `a2enmod http2` → `configtest` OK → `reload`. Protocols `h2 h2c http/1.1` (via `http2.conf`).
- **Vérifié** : `curl --http2` → `2`, ALPN défaut → `2`, `http2_module` chargé, `/` 200 HTTP/2, `load-styles.php` 200.
- Rollback : `a2dismod http2` + restart.
- Prérequis levé par OPTIM-02 : HTTP/2 nécessite un MPM threadé → impossible sous l'ancien `prefork`+`mod_php`, possible depuis la migration `mpm_event`.

## Lighthouse — métriques (mobile)
- TTFB **200 ms** (✅ le cache de page fait son job), TBT 0 ms, CLS 0.012 (✅).
- **LCP 5.6 s**, FCP 4.2 s, Speed Index 5.8 s → à améliorer (front-end, pas serveur).

## Recommandations restantes (front-end, hors config serveur pure)
Ce sont des réglages **WordPress/Divi/plugins**, pas Apache :
- **Minifier CSS/JS** (`unminified-css`, `unminified-javascript`=0) + **réduire CSS/JS inutilisés** (`unused-css-rules`, `unused-javascript`=0) → activer **Divi → Options → Performance** (Dynamic CSS, Dynamic JS, defer jQuery, Critical CSS).
- **`font-display: swap`** (`font-display-insight`=0).
- **Image delivery** (`image-delivery-insight`, `lcp-discovery-insight`=0) : Imagify actif → vérifier WebP + dimensions explicites + **préchargement de l'image LCP**.
- **Render-blocking** : différer CSS/JS non critiques.

## Statut : ✅ HTTP/2 activé. OCSP stapling + optimisations front-end = à valider.
