php7.4 - update config example & add install script.

This commit is contained in:
Mark 2022-04-03 21:19:14 +01:00
parent fe08e5d1df
commit 9e551777b1
2 changed files with 27 additions and 15 deletions

View File

@ -24,44 +24,42 @@ listen.owner = root
listen = /run/php/$pool.sock
; Be sure to change these path values to match where your sites are.
; Leave the /$pool/ bit where it is.
; Leave the /$pool bit where it is.
; You only need to change /var/www/ to where you've placed your sites.
; e.g you have your sites in /var/srv, you'd enter /var/srv/$pool/
; instead, and for the session.save_path...
; /var/srv/$pool/sessions/ :)
; e.g you have your sites in /var/srv, you'd enter /var/srv/$pool.
;
; Remember to change all the paths (if you need to)!!
prefix = /var/www/$pool/
prefix = /var/www/$pool
; session save_path needs a full path value.
php_admin_value[session.save_path] = /var/www/$pool/sessions/
php_admin_value[session.save_path] = $prefix/sessions
; These also need full path values.
env[TMP] = /var/www/$pool/tmp/
env[TMPDIR] = /var/www/$pool/tmp/
env[TEMP] = /var/www/$pool/tmp/
env[TMP] = $prefix/tmp
env[TMPDIR] = $prefix/tmp
env[TEMP] = $prefix/tmp
; You generally don't need to edit anything else below this line.
listen.mode = 0660
php_admin_value[open_basedir] = ./:/usr/share/php:/etc/ssl/certs/
php_admin_value[open_basedir] = $prefix:/usr/share/php:/etc/ssl/certs
php_admin_value[disable_functions] = dl,exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source
php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f noreply@$pool
php_admin_value[memory_limit] = 256M
php_admin_value[upload_max_filesize] = 100M
php_admin_value[upload_tmp_dir] = tmp/
php_admin_value[error_log] = htdocs/.error.log
php_admin_value[upload_tmp_dir] = $prefix/tmp
php_admin_value[error_log] = $prefix/tmp/php-error.log
php_admin_flag[log_errors] = on
php_flag[display_errors] = off
access.log = htdocs/.access.log
access.log = $prefix/tmp/php-access.log
access.format = "[%t] %m %{REQUEST_SCHEME}e://%{HTTP_HOST}e%{REQUEST_URI}e %f pid:%p took:%ds mem:%{mega}Mmb cpu:%C%% status:%s {%{REMOTE_ADDR}e|%{HTTP_X_FORWARDED_FOR}e|%{HTTP_USER_AGENT}e}"
pm = ondemand
pm.max_children = 100
pm.process_idle_timeout = 10s
pm.max_requests = 500
pm.process_idle_timeout = 600s
pm.max_requests = 1000
catch_workers_output = yes

14
debian/bullseye/php/php-7.4-install.sh vendored Normal file
View File

@ -0,0 +1,14 @@
#!/bin/bash
# Run this script with "(sudo) bash <filename> <args>".
# Exit on error.
set -e
apt install apt install php-fpm php-readline php-mbstring php-gd \
php-curl php-zip php-mysql php-dom php-json php-pdo php-fileinfo \
php-bz2 php-intl php-gmp php-apcu php-pear php-cli php-imagick
mv -v /etc/php/7.4/fpm/pool.d/www.conf /etc/php/7.4/fpm/pool.d/www.conf.disabled
systemctl restart php7.4-fpm