From 5d6c23cff9ed5ce2668f1fc0624bd76f7a0bf79b Mon Sep 17 00:00:00 2001 From: David Duque Date: Sun, 21 Jun 2020 15:18:46 +0100 Subject: [PATCH] Finalize php configuration --- conf/nginx-custom.conf | 3 +++ conf/nginx-top.conf | 2 +- management/templates/index.html | 2 +- setup/functions.sh | 2 ++ setup/preflight.sh | 2 +- 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/conf/nginx-custom.conf b/conf/nginx-custom.conf index 83737884..fbb2dd15 100644 --- a/conf/nginx-custom.conf +++ b/conf/nginx-custom.conf @@ -2,6 +2,9 @@ root $ROOT; index index.html index.htm; + # If you want to use the PHP socket, use the "php-fpm" alias. + + # DON'T DELETE THE LINE BELOW # ADDITIONAL DIRECTIVES HERE # Disable viewing dotfiles (.htaccess, .svn, .git, etc.) diff --git a/conf/nginx-top.conf b/conf/nginx-top.conf index 435b5f7b..a4d09292 100644 --- a/conf/nginx-top.conf +++ b/conf/nginx-top.conf @@ -7,6 +7,6 @@ ## your own --- please do not ask for help from us. upstream php-fpm { - server unix:/var/run/php/php7.3-fpm.sock; + server unix:/var/run/php/php!!___PHPVER___!!-fpm.sock; } diff --git a/management/templates/index.html b/management/templates/index.html index d88eb569..f4fa9a52 100644 --- a/management/templates/index.html +++ b/management/templates/index.html @@ -180,7 +180,7 @@
diff --git a/setup/functions.sh b/setup/functions.sh index 509d3dc0..634f3332 100644 --- a/setup/functions.sh +++ b/setup/functions.sh @@ -223,3 +223,5 @@ if [ "$OS" == "Debian GNU/Linux 10 (buster)" ]; then elif [ "$OS" == "Ubuntu 20.04 LTS" ]; then export PHP_VERSION="7.4" fi + +sed -i "s|!!___PHPVER___!!|${PHP_VERSION}|g" conf/nginx-top.conf diff --git a/setup/preflight.sh b/setup/preflight.sh index 013eb038..785ec72d 100644 --- a/setup/preflight.sh +++ b/setup/preflight.sh @@ -18,7 +18,7 @@ if [ "$OS" != "Debian GNU/Linux 10 (buster)" -a "$OS" != "Ubuntu 20.04 LTS" ]; t exit 1 fi -sed -i "s|__OSTAG__|${OS}|g" management/templates/index.html +sed -i "s|!!___DIST_TAG___!!|${OS}|g" management/templates/index.html # Check that we have enough memory. #