diff options
Diffstat (limited to 'etc/ncp-templates/php/pool.d.www.conf.sh')
-rw-r--r-- | etc/ncp-templates/php/pool.d.www.conf.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/etc/ncp-templates/php/pool.d.www.conf.sh b/etc/ncp-templates/php/pool.d.www.conf.sh new file mode 100644 index 00000000..50a65abb --- /dev/null +++ b/etc/ncp-templates/php/pool.d.www.conf.sh @@ -0,0 +1,32 @@ +#! /bin/bash + +set -e +source /usr/local/etc/library.sh + +PHPVER="${PHPVER?ERROR: PHPVER variable unset!}" + +if [[ "$1" == "--defaults" ]] || ! [[ -f "${BINDIR}/CONFIG/nc-datadir.sh" ]] +then + echo -e "INFO: Restoring template to default settings" + + PHPTHREADS=6 +else + PHPTHREADS="$(source "${BINDIR}/CONFIG/nc-limits.sh"; tmpl_php_threads)" +fi + + +cat <<EOF +[www] +user = www-data +group = www-data +listen = /run/php/php7.4-fpm.sock +listen.owner = www-data +listen.group = www-data +pm = static +pm.max_children = ${PHPTHREADS} +pm.start_servers = 4 +pm.min_spare_servers = 4 +pm.max_spare_servers = 8 +pm.status_path = /status +slowlog = log/\$pool.log.slow +EOF |