From b8f7d350649c9e2b3e0a7bcb98319129cf08de80 Mon Sep 17 00:00:00 2001 From: Imugiii Date: Thu, 30 Apr 2026 13:07:12 +0000 Subject: [PATCH] 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. --- docker/apache/vhost.conf | 5 +++++ docker/php-fpm/www.conf | 8 +++++++- src/public/admin/index.php | 34 ++++++++++++++++++++++++++++++++++ src/public/borne/index.html | 20 ++++++++++++++++++++ 4 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 src/public/admin/index.php create mode 100644 src/public/borne/index.html diff --git a/docker/apache/vhost.conf b/docker/apache/vhost.conf index 469e57c..d0411f2 100644 --- a/docker/apache/vhost.conf +++ b/docker/apache/vhost.conf @@ -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 diff --git a/docker/php-fpm/www.conf b/docker/php-fpm/www.conf index 386956f..2028171 100644 --- a/docker/php-fpm/www.conf +++ b/docker/php-fpm/www.conf @@ -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. diff --git a/src/public/admin/index.php b/src/public/admin/index.php new file mode 100644 index 0000000..bea045c --- /dev/null +++ b/src/public/admin/index.php @@ -0,0 +1,34 @@ + + + + + + + Wakdo - back-office + + + +

Wakdo - back-office

+

En construction.

+

Phase P1 - conception Merise en cours. Le back-office sera implemente en phases P2 a P4.

+
+

Diagnostic FastCGI : PHP repond a .

+

TODO P2 : assets partages (logo, images produits) via Apache Alias entre les 2 vhosts.

+ + diff --git a/src/public/borne/index.html b/src/public/borne/index.html new file mode 100644 index 0000000..7da4921 --- /dev/null +++ b/src/public/borne/index.html @@ -0,0 +1,20 @@ + + + + + + + Wakdo - borne client + + + + Wakdo +

Wakdo - borne client

+

En construction.

+

Phase P1 - conception Merise en cours. Le front borne sera implemente en phase P5.

+ +