From 66de5c677e0672a136b1cb5ec3c871d8e78f3785 Mon Sep 17 00:00:00 2001 From: Bram Prieshof Date: Fri, 17 Jul 2020 14:18:23 +0200 Subject: [PATCH] Added php-FPM pool for backend services --- CMS/Backend/Fpm-Pool.conf-unconfigured | 19 +++++++++++++++++++ CMS/Backend/conf.sh | 7 +++++++ CMS/Backend/nginx-siteBackend-unconfigured | 2 +- installer.sh | 3 ++- 4 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 CMS/Backend/Fpm-Pool.conf-unconfigured create mode 100644 CMS/Backend/conf.sh diff --git a/CMS/Backend/Fpm-Pool.conf-unconfigured b/CMS/Backend/Fpm-Pool.conf-unconfigured new file mode 100644 index 0000000..d351741 --- /dev/null +++ b/CMS/Backend/Fpm-Pool.conf-unconfigured @@ -0,0 +1,19 @@ +[Backend] +user = Backend +group = Backend +listen = /var/run/php/phpPHPver-fpm-Backend.sock +listen.owner = www-data +listen.group = www-data +php_admin_value[disable_functions] = exec,passthru,shell_exec,system +php_admin_value[cgi.fix_pathinfo] = 0 +php_admin_value[max_input_vars] = 10000 +php_admin_value[upload_max_filesize] = 128M +php_admin_value[post_max_size] = 64m +php_admin_flag[allow_url_fopen] = off +pm = dynamic +pm.max_children = 5 +pm.start_servers = 2 +pm.min_spare_servers = 1 +pm.max_spare_servers = 3 +chdir = / + diff --git a/CMS/Backend/conf.sh b/CMS/Backend/conf.sh new file mode 100644 index 0000000..710df6f --- /dev/null +++ b/CMS/Backend/conf.sh @@ -0,0 +1,7 @@ +#Backend PHP Pool +wget -q -t7 "$repo"/raw/branch/"$branch"/CMS/Backend/Fpm-Pool.conf-unconfigured -O /etc/php/"$phpver"/fpm/pool.d/Backend.conf +sed -i 's/PHPver/'$phpver'/' /etc/php/"$phpver"/fpm/pool.d/Backend.conf +groupadd Backend +useradd -g Backend Backend +chown Backend:Backend -R /usr/share/phpmyadmin +chown Backend:Backend -R /var/lib/phpmyadmin/tmp \ No newline at end of file diff --git a/CMS/Backend/nginx-siteBackend-unconfigured b/CMS/Backend/nginx-siteBackend-unconfigured index 29a12fd..2b6d146 100644 --- a/CMS/Backend/nginx-siteBackend-unconfigured +++ b/CMS/Backend/nginx-siteBackend-unconfigured @@ -25,7 +25,7 @@ location = /backend/netdata { include fastcgi_params; fastcgi_param SCRIPT_FILENAME $request_filename; fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass unix:/var/run/php/phpPHPver-fpm.sock; + fastcgi_pass unix:/var/run/php/phpPHPver-fpm-Backend.sock; fastcgi_index index.php; } } diff --git a/installer.sh b/installer.sh index fc4bdfd..4ab970a 100644 --- a/installer.sh +++ b/installer.sh @@ -39,6 +39,7 @@ PKGI="${PKGM} install -y --no-install-recommends" if [ $TestMode = 1 ]; then domain=ict-dagbesteding.nl +sitename=ict_DB_nl email=b.prieshof@ictmaatwerk.com password=MeiFerrieSekureTESTp@ssw0rd4213 hostname=vdh001.nxdi.nl @@ -564,4 +565,4 @@ systemctl reload sshd postfix postfix@- # Done # ##-------## -msg " Done installing!" \ No newline at end of file +msg " Done installing!"