From 64d698359c0f5720240e9460bb6b751109000b7b Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 7 Sep 2023 16:52:37 +0200 Subject: [PATCH] mastercontainer - limit access to php-fpm to localhost Signed-off-by: Simon L --- Containers/mastercontainer/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Containers/mastercontainer/Dockerfile b/Containers/mastercontainer/Dockerfile index b10ede50b45..b72e638c419 100644 --- a/Containers/mastercontainer/Dockerfile +++ b/Containers/mastercontainer/Dockerfile @@ -56,6 +56,8 @@ RUN set -ex; \ sed -i 's/^pm = dynamic/pm = ondemand/' /usr/local/etc/php-fpm.d/www.conf; \ sed -i 's/^pm.max_children =.*/pm.max_children = 80/' /usr/local/etc/php-fpm.d/www.conf; \ sed -i 's|access.log = /proc/self/fd/2|access.log = /proc/self/fd/1|' /usr/local/etc/php-fpm.d/docker.conf; \ + grep -q ';listen.allowed_clients' /usr/local/etc/php-fpm.d/www.conf; \ + sed -i 's|;listen.allowed_clients.*|listen.allowed_clients = 127.0.0.1,::1|' /usr/local/etc/php-fpm.d/www.conf; \ \ apk add --no-cache git; \ wget https://getcomposer.org/installer -O - | php -- --install-dir=/usr/local/bin --filename=composer; \