From ade90e81e97836c53bb2b2786b8e159bed9de45e Mon Sep 17 00:00:00 2001 From: Fascinated Date: Sat, 8 Jul 2023 00:24:42 +0100 Subject: [PATCH] make php use a sock --- docker/nginx.conf | 2 +- docker/start.sh | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docker/nginx.conf b/docker/nginx.conf index df0dc49..217b5eb 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -44,7 +44,7 @@ http { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass unix:/run/php/php8.1-fpm.sock; + fastcgi_pass unix:/run/php/php.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_NAME $fastcgi_script_name; fastcgi_index index.php; diff --git a/docker/start.sh b/docker/start.sh index 814482e..2b39f2a 100644 --- a/docker/start.sh +++ b/docker/start.sh @@ -16,6 +16,9 @@ fi echo "env[DOCKER] = true" >> /etc/php81/php-fpm.d/www.conf echo "clear_env = no" >> /etc/php81/php-fpm.d/www.conf +# Set php-fpm to listen on socket +RUN sed -i 's/^listen = .*/listen = \/run\/php\/php.sock/' /etc/php8.1/php-fpm.d/www.conf + echo "Setting permissions for upload script" chmod 777 /var/www/html/upload.php