corentin_wakdo/docker/php-fpm/www.conf
Imugiii b8f7d35064 feat(stubs): unblock 403 with kiosk and admin index pages, plus FastCGI fixes
Three changes bundled because the stubs surfaced two pre-existing infra bugs
that had never been hit (the smoke test only exercised PHP via 'docker exec',
not via the full Apache->PHP-FPM FastCGI path).

- src/public/borne/index.html : minimal HTML stub for the kiosk vhost
  (200 OK with the imported logo)
- src/public/admin/index.php : minimal PHP stub that proves the full
  FastCGI chain works end-to-end (renders PHP_VERSION + current timestamp)
- docker/apache/vhost.conf : add 'DirectoryIndex index.php index.html' on
  the admin vhost. Without it, hitting / returned 403 because the default
  Apache DirectoryIndex is index.html only, and the existing RewriteRule
  did not apply to the directory request (\!-d cond was false).
- docker/php-fpm/www.conf : comment out 'listen.allowed_clients = any'.
  PHP-FPM 8.3 rejects 'any' with 'Wrong IP address' and ends up dropping
  every connection from Apache. With the directive absent, all connections
  are accepted, which is acceptable in our isolated Docker network.
2026-04-30 13:07:12 +00:00

58 lines
2.3 KiB
Text

; Wakdo - pool PHP-FPM (surcharge le pool www par defaut)
; Charge en dernier via prefixe zz- pour avoir priorite sur www.conf officiel.
[www]
; --- Identite utilisateur ---
; L'image officielle cree l'utilisateur www-data (UID 82 en Alpine).
; On reste sur le default : on ne change pas l'UID pour eviter les soucis
; de permissions sur les uploads (volume wakdo_uploads geré par Docker).
user = www-data
group = www-data
; --- Socket d'ecoute ---
; TCP pour que wakdo-web (Apache) puisse reverse-proxy FastCGI via le reseau
; interne. Socket Unix serait plus performant mais exigerait un volume partage
; entre conteneurs, plus complexe a orchestrer.
listen = 0.0.0.0:9000
; Le socket reseau est volontairement ouvert. La securite est assuree par
; le fait que wakdo-app n'est attache qu'au reseau interne wakdo_internal
; (non expose a l'hote, non expose au proxy Traefik). Seul wakdo-web peut
; y acceder.
;
; listen.allowed_clients est commente : PHP-FPM 8.3 ne reconnait pas la
; valeur 'any' (erreur "Wrong IP address 'any' in listen.allowed_clients,
; There are no allowed addresses"). Quand la directive est absente,
; PHP-FPM accepte toutes les connexions, ce qui est equivalent a 'any'
; et acceptable ici puisque le reseau Docker isole deja l'acces.
; listen.allowed_clients =
; --- Process manager (pm) ---
; Mode dynamic : ajuste le nombre de workers entre min et max selon la charge.
; Valeurs adaptees a une borne de commande en restauration rapide : pics courts
; a l'heure du repas, faible charge le reste du temps.
; Pour un VPS 2 vCPU / 4 Go RAM : chaque worker PHP consomme ~30-60 Mo.
; Avec max_children=10, pire cas ~600 Mo reserve a PHP, marge pour MariaDB.
pm = dynamic
pm.max_children = 10
pm.start_servers = 3
pm.min_spare_servers = 2
pm.max_spare_servers = 5
pm.max_requests = 500
; --- Status et ping pour monitoring / healthcheck ---
; /fpm-status et /fpm-ping ne sont accessibles qu'au sein du conteneur
; (le vhost Apache n'exposera pas ces endpoints publiquement).
pm.status_path = /fpm-status
ping.path = /fpm-ping
ping.response = pong
; --- Logs ---
; Redirection vers stderr du conteneur : agregation par docker logs.
access.log = /proc/self/fd/2
access.format = "%R - %u %t \"%m %r\" %s"
; Logs d'erreurs PHP : deja rediriges via error_log dans php.ini.
catch_workers_output = yes
decorate_workers_output = no