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.
This commit is contained in:
Imugiii 2026-04-30 13:07:12 +00:00
parent 84d2559ba9
commit b8f7d35064
4 changed files with 66 additions and 1 deletions

View file

@ -98,6 +98,11 @@
AllowOverride None
Require all granted
# DirectoryIndex etend a index.php pour que la racine `/` serve
# le front controller PHP sans passer par RewriteRule (qui ne se
# declenche pas sur un repertoire existant a cause du `!-d`).
DirectoryIndex index.php index.html
# Front controller MVC : toute requete non-fichier passe par index.php
# qui dispatche via le Router (src/Core/Router.php a venir en P2).
RewriteEngine On

View file

@ -20,7 +20,13 @@ listen = 0.0.0.0:9000
; 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 = any
;
; 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.

View file

@ -0,0 +1,34 @@
<?php
declare(strict_types=1);
// Stub pour debloquer le routage Apache + valider la chaine FastCGI vers PHP-FPM.
// Sera remplace par le front controller MVC en phase P2 (src/Core/Router.php a venir).
header('Content-Type: text/html; charset=utf-8');
header('X-Robots-Tag: noindex, nofollow');
$phpVersion = htmlspecialchars(PHP_VERSION, ENT_QUOTES, 'UTF-8');
$now = htmlspecialchars(date('Y-m-d H:i:s'), ENT_QUOTES, 'UTF-8');
?><!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="robots" content="noindex, nofollow">
<title>Wakdo - back-office</title>
<style>
body { font-family: system-ui, sans-serif; margin: 2rem; color: #222; }
img { max-height: 80px; }
small { color: #666; }
code { background: #f4f4f4; padding: 0.1em 0.3em; border-radius: 3px; }
</style>
</head>
<body>
<h1>Wakdo - back-office</h1>
<p>En construction.</p>
<p><small>Phase P1 - conception Merise en cours. Le back-office sera implemente en phases P2 a P4.</small></p>
<hr>
<p><small>Diagnostic FastCGI : PHP <code><?= $phpVersion ?></code> repond a <code><?= $now ?></code>.</small></p>
<p><small>TODO P2 : assets partages (logo, images produits) via Apache Alias entre les 2 vhosts.</small></p>
</body>
</html>

View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="robots" content="noindex, nofollow">
<title>Wakdo - borne client</title>
<style>
body { font-family: system-ui, sans-serif; margin: 2rem; color: #222; }
img { max-height: 80px; }
small { color: #666; }
</style>
</head>
<body>
<img src="/assets/images/ui/logo.png" alt="Wakdo">
<h1>Wakdo - borne client</h1>
<p>En construction.</p>
<p><small>Phase P1 - conception Merise en cours. Le front borne sera implemente en phase P5.</small></p>
</body>
</html>