From db348e3202cfdb084978274990003ea1647a4942 Mon Sep 17 00:00:00 2001 From: Xavier Claude Date: Mon, 23 Mar 2026 16:41:16 +0100 Subject: [PATCH] Add the DISABLE_IPV6 option in php-fpm Copy the same DISABLE_IPV6 option present in the nginx script to php-fpm to allow the service to start when IPv6 is disable in the kernel --- core/files/entrypoint_fpm.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/core/files/entrypoint_fpm.sh b/core/files/entrypoint_fpm.sh index 7b96e7a..f1f24cc 100755 --- a/core/files/entrypoint_fpm.sh +++ b/core/files/entrypoint_fpm.sh @@ -83,8 +83,13 @@ change_php_vars() { sed -i -E "s/^pm.status_listen =/;pm.status_listen =/" "$FILE" fi if [[ -n "$PHP_LISTEN_FPM" ]]; then - echo "Configure PHP | Setting 'listen' to [::]:9002" - sed -i "/^listen =/s@=.*@= [::]:9002@" "$FILE" + if [[ "$DISABLE_IPV6" = "true" ]]; then + echo "Configure PHP | Setting 'listen' to 0.0.0.0:9002" + sed -i "/^listen =/s@=.*@= 0.0.0.0:9002@" "$FILE" + else + echo "Configure PHP | Setting 'listen' to [::]:9002" + sed -i "/^listen =/s@=.*@= [::]:9002@" "$FILE" + fi fi done