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 8373788..fbb2dd1 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 435b5f7..a4d0929 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 d88eb56..f4fa9a5 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 509d3dc..634f333 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 013eb03..785ec72 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. #