Skip to content

Commit 5cc0153

Browse files
authored
Merge pull request #3353 from nextcloud/linux-php-socket
2 parents 18b281e + b972c99 commit 5cc0153

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

Containers/mastercontainer/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,10 @@ RUN set -ex; \
5656
sed -i 's/^pm = dynamic/pm = ondemand/' /usr/local/etc/php-fpm.d/www.conf; \
5757
sed -i 's/^pm.max_children =.*/pm.max_children = 80/' /usr/local/etc/php-fpm.d/www.conf; \
5858
sed -i 's|access.log = /proc/self/fd/2|access.log = /proc/self/fd/1|' /usr/local/etc/php-fpm.d/docker.conf; \
59-
grep -q ';listen.allowed_clients' /usr/local/etc/php-fpm.d/www.conf; \
60-
sed -i 's|;listen.allowed_clients.*|listen.allowed_clients = 127.0.0.1,::1|' /usr/local/etc/php-fpm.d/www.conf; \
59+
grep -q 'listen =' /usr/local/etc/php-fpm.d/www.conf; \
60+
sed -i 's|listen =.*|;listen = /var/run/php.sock # handled in zz-docker.conf|' /usr/local/etc/php-fpm.d/www.conf; \
61+
grep -q 'listen =' /usr/local/etc/php-fpm.d/zz-docker.conf; \
62+
sed -i 's|listen =.*|listen = /var/run/php.sock|' /usr/local/etc/php-fpm.d/zz-docker.conf; \
6163
\
6264
apk add --no-cache git; \
6365
wget https://getcomposer.org/installer -O - | php -- --install-dir=/usr/local/bin --filename=composer; \

Containers/mastercontainer/healthcheck.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ if [ -f "/mnt/docker-aio-config/data/configuration.json" ]; then
55
nc -z localhost 8000 || exit 1
66
nc -z localhost 8080 || exit 1
77
nc -z localhost 8443 || exit 1
8-
nc -z localhost 9000 || exit 1
98
nc -z localhost 9876 || exit 1
9+
[ -f /var/run/php.sock ] || exit 1
1010
fi

Containers/mastercontainer/mastercontainer.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Listen 8080
1919

2020
# PHP match
2121
<FilesMatch "\.php$">
22-
SetHandler "proxy:fcgi://localhost:9000"
22+
SetHandler "proxy:unix:/var/run/php.sock"
2323
</FilesMatch>
2424
# Master dir
2525
DocumentRoot /var/www/docker-aio/php/public/

0 commit comments

Comments
 (0)