فهرست منبع

PHP-FPM support

Ernesto Nicolás Carrea 5 سال پیش
والد
کامیت
d64c9bd68c
54فایلهای تغییر یافته به همراه85 افزوده شده و 78 حذف شده
  1. 1 1
      bin/module/list.inc
  2. 3 3
      bin/module/php-fpm/add.inc
  3. 4 4
      bin/module/php-fpm/del.inc
  4. 1 1
      bin/module/php-fpm/install.inc
  5. 1 1
      bin/module/php-fpm/list.inc
  6. 1 1
      bin/module/php/integrate.inc
  7. 2 2
      bin/module/phpmyadmin/integrate.inc
  8. 1 1
      bin/module/what-provides.inc
  9. 1 1
      bin/v-rebuild-web-domains
  10. 6 0
      bin/v-restart-service
  11. 3 2
      bin/v-restart-web-backend
  12. 2 2
      func/domain.sh
  13. 3 3
      func/osal_debian_based.sh
  14. 4 4
      func/osal_rhel_based.sh
  15. 1 1
      install/rhel/multiphp/httpd/PHP-56.sh
  16. 1 1
      install/rhel/multiphp/httpd/PHP-56.stpl
  17. 1 1
      install/rhel/multiphp/httpd/PHP-56.tpl
  18. 1 1
      install/rhel/multiphp/httpd/PHP-70.sh
  19. 1 1
      install/rhel/multiphp/httpd/PHP-70.stpl
  20. 1 1
      install/rhel/multiphp/httpd/PHP-70.tpl
  21. 1 1
      install/rhel/multiphp/httpd/PHP-71.sh
  22. 1 1
      install/rhel/multiphp/httpd/PHP-71.stpl
  23. 1 1
      install/rhel/multiphp/httpd/PHP-71.tpl
  24. 1 1
      install/rhel/multiphp/httpd/PHP-72.sh
  25. 1 1
      install/rhel/multiphp/httpd/PHP-72.stpl
  26. 1 1
      install/rhel/multiphp/httpd/PHP-72.tpl
  27. 7 7
      install/rhel/multiphp/httpd/PHP-73.sh
  28. 1 1
      install/rhel/multiphp/httpd/PHP-73.stpl
  29. 1 1
      install/rhel/multiphp/httpd/PHP-73.tpl
  30. 7 7
      install/rhel/multiphp/httpd/PHP-74.sh
  31. 1 1
      install/rhel/multiphp/httpd/PHP-74.stpl
  32. 1 1
      install/rhel/multiphp/httpd/PHP-74.tpl
  33. 1 1
      install/rhel/multiphp/nginx/PHP-56.sh
  34. 1 1
      install/rhel/multiphp/nginx/PHP-56.stpl
  35. 1 1
      install/rhel/multiphp/nginx/PHP-56.tpl
  36. 1 1
      install/rhel/multiphp/nginx/PHP-70.sh
  37. 1 1
      install/rhel/multiphp/nginx/PHP-70.stpl
  38. 1 1
      install/rhel/multiphp/nginx/PHP-70.tpl
  39. 1 1
      install/rhel/multiphp/nginx/PHP-71.sh
  40. 1 1
      install/rhel/multiphp/nginx/PHP-71.stpl
  41. 1 1
      install/rhel/multiphp/nginx/PHP-71.tpl
  42. 1 1
      install/rhel/multiphp/nginx/PHP-72.sh
  43. 1 1
      install/rhel/multiphp/nginx/PHP-72.stpl
  44. 1 1
      install/rhel/multiphp/nginx/PHP-72.tpl
  45. 1 1
      install/rhel/multiphp/nginx/PHP-73.sh
  46. 1 1
      install/rhel/multiphp/nginx/PHP-73.stpl
  47. 1 1
      install/rhel/multiphp/nginx/PHP-73.tpl
  48. 1 1
      install/rhel/multiphp/nginx/PHP-74.sh
  49. 1 1
      install/rhel/multiphp/nginx/PHP-74.stpl
  50. 1 1
      install/rhel/multiphp/nginx/PHP-74.tpl
  51. 1 1
      install/rhel/php-fpm/multiphp.tpl
  52. 1 1
      install/rhel/templates/web/php-fpm/default.tpl
  53. 1 1
      install/rhel/templates/web/php-fpm/no-php.tpl
  54. 1 1
      install/rhel/templates/web/php-fpm/socket.tpl

+ 1 - 1
bin/module/list.inc

@@ -4,7 +4,7 @@ hestia_module_list() {
     source $HESTIA/bin/module/func.inc
 
     printf "%-16s %-12s %-4s %s\n" "Module" "Provides" "Inst" "Description"
-    for hmd in $HESTIA/data/modules/*.hmd; do
+    for hmd in $HESTIA_INSTALL_DIR/../modules/*.hmd; do
         local mod_name=$(osal_kv_read $hmd 'name')
         local mod_provides=$(osal_kv_read $hmd 'provides')
         local mod_descr=$(osal_kv_read $hmd 'description')

+ 3 - 3
bin/module/php-fpm/add.inc

@@ -57,7 +57,7 @@ hestia_module_php-fpm_add() {
 
     echo "Adding PHP (FPM) version ${php_version}..."
 
-    local php_prefix=$(osal_multiphp_php_package_prefix $php_version)
+    local php_prefix=$(osal_php_package_prefix $php_version)
 
     mph="$php_prefix-mbstring $php_prefix-bcmath $php_prefix-cli $php_prefix-curl
         $php_prefix-fpm $php_prefix-gd $php_prefix-intl $php_prefix-mysql
@@ -75,7 +75,7 @@ hestia_module_php-fpm_add() {
     osal_execute_with_spinner osal_package_install $mph
 
     # Check if installation was sucessfully
-    if [ ! $(osal_multiphp_fpm_isinstalled $php_version) ]; then
+    if [ ! $(osal_php_fpm_isinstalled $php_version) ]; then
         echo "Installation failed, please run the following command manualy for debuging:"
         echo "$OSAL_CMD_PACKAGE_MANAGER install ${mph//\\n/ \\}"
     fi
@@ -88,7 +88,7 @@ hestia_module_php-fpm_add() {
 
     # Configure FPM
     osal_service_enable $php_prefix-fpm > /dev/null 2>&1
-    pool_d=$(osal_multiphp_fpm_pool_d $php_version)
+    pool_d=$(osal_php_fpm_pool_d $php_version)
     if [ "$pool_d" ]; then
         mkdir -p $pool_d
         hestia_safe_rm $pool_d/*

+ 4 - 4
bin/module/php-fpm/del.inc

@@ -38,7 +38,7 @@ hestia_module_php-fpm_del() {
 
     php_withoutdot=${php_version//.}
 
-    php_version_present=$(osal_kv_read_bool $HESTIA_CONF_MODULES/php.conf "php${php_withoutdot}_present" && echo 1)
+    php_version_present=$(osal_kv_read_bool $HESTIA_CONF_MODULES/php-fpm.conf "php${php_withoutdot}_present" && echo 1)
     if [ ! "$php_version_present" ] && [ ! "$param_force" ]; then
         echo "PHP (FPM) version ${php_version} is not present. See 'hestia module php-fpm list'."
         return 1
@@ -53,7 +53,7 @@ hestia_module_php-fpm_del() {
     hestia_config_backup 'php-del' $php_etc_folder \
         $HESTIA/data/templates/web/php-fpm/PHP-${php_version/\./_}.tpl
 
-    php_prefix=$(osal_multiphp_php_package_prefix $php_version)
+    php_prefix=$(osal_php_package_prefix $php_version)
 
     mph="$php_prefix-mbstring $php_prefix-bcmath $php_prefix-cli $php_prefix-curl
         $php_prefix-fpm $php_prefix-gd $php_prefix-intl $php_prefix-mysql
@@ -71,7 +71,7 @@ hestia_module_php-fpm_del() {
     osal_execute_with_spinner osal_package_remove $mph
 
     # Check if uninstallation was sucessfully
-    if [ $(osal_multiphp_fpm_isinstalled $php_version) ]; then
+    if [ $(osal_php_fpm_isinstalled $php_version) ]; then
         echo "Uninstallation failed, please run the following command manualy for debuging:"
         echo "$OSAL_CMD_PACKAGE_MANAGER (remove or purge) ${mph//\\n/ \\}"
     fi
@@ -80,7 +80,7 @@ hestia_module_php-fpm_del() {
     [ -f $HESTIA/data/templates/web/php-fpm/PHP-${php_version/\./_}.tpl ] && hestia_safe_rm $HESTIA/data/templates/web/php-fpm/PHP-${php_version/\./_}.tpl
     [[ -d "$php_etc_folder" ]] && hestia_safe_rm "$php_etc_folder"
 
-    osal_kv_write $HESTIA_CONF_MODULES/php.conf "php${php_withoutdot}_present" '0'
+    osal_kv_write $HESTIA_CONF_MODULES/php-fpm.conf "php${php_withoutdot}_present" '0'
 
     log_history "removed php $phpversion" '' 'admin'
 

+ 1 - 1
bin/module/php-fpm/install.inc

@@ -11,7 +11,7 @@ hestia_module_php-fpm_install() {
 
     echo "Installing PHP (FPM) module..."
 
-    local pool_d=$(osal_multiphp_fpm_pool_d $PHP_DEFAULT_VERSION)
+    local pool_d=$(osal_php_fpm_pool_d $PHP_DEFAULT_VERSION)
     mkdir -p $pool_d
     cp -f $HESTIA_INSTALL_DIR/php-fpm/www.conf $pool_d/www.conf
 

+ 1 - 1
bin/module/php-fpm/list.inc

@@ -13,7 +13,7 @@ hestia_module_php-fpm_list() {
     for php_version in $PHP_SUPPORTED_VERSIONS; do
         php_withoutdot=${php_version//.}
         php_version_present=$(osal_kv_read $HESTIA_CONF_MODULES/php-fpm.conf "php${php_withoutdot}_present" 0)
-        echo PHP (FPM) ${php_version}: $(osal_bool_tostring $php_version_present 'present' 'not present')
+        echo "PHP (FPM) ${php_version}: $(osal_bool_tostring $php_version_present 'present' 'not present')"
     done
 
     return 0

+ 1 - 1
bin/module/php/integrate.inc

@@ -11,7 +11,7 @@ hestia_module_php_integrate() {
             osal_apache_module_disable php$fpm_v > /dev/null 2>&1
             osal_apache_module_disable mpm_prefork > /dev/null 2>&1
             osal_apache_module_enable mpm_event > /dev/null 2>&1
-            cp -f $HESTIA_INSTALL_DIR/apache2/hestia-event.conf $OSAL_PATH_APACHE_CONF_D/
+            cp -f $HESTIA_INSTALL_DIR/$WEB_SYSTEM/hestia-event.conf $OSAL_PATH_APACHE_CONF_D/
         elif [ "$php_variant" = 'ruid2' ]; then
             # FIXME: enable only if needed
             osal_apache_module_enable ruid2 > /dev/null 2>&1

+ 2 - 2
bin/module/phpmyadmin/integrate.inc

@@ -8,12 +8,12 @@ hestia_module_phpmyadmin_integrate() {
         # Setup Nginx config
         cp -f $HESTIA_INSTALL_DIR/nginx/phpmyadmin.inc $OSAL_PATH_NGINX_CONF_D/
         # Remove apache support        
-        rm -f $OSAL_PATH_APACHE_CONF_D/phpmyadmin.conf
+        hestia_safe_rm $OSAL_PATH_APACHE_CONF_D/phpmyadmin.conf
     elif [ "$WEB_SYSTEM" = 'apache2' ] || [ "$WEB_SYSTEM" = 'httpd' ]; then
         # Setup Apache config
         cp -f $HESTIA_INSTALL_DIR/pma/apache.conf /etc/phpmyadmin/
         ln -sf /etc/phpmyadmin/apache.conf $OSAL_PATH_APACHE_CONF_D/phpmyadmin.conf
         # Remove Nginx support
-        rm -f $OSAL_PATH_NGINX_CONF_D/phpmyadmin.inc
+        hestia_safe_rm $OSAL_PATH_NGINX_CONF_D/phpmyadmin.inc
     fi
 }

+ 1 - 1
bin/module/what-provides.inc

@@ -13,7 +13,7 @@ hestia_module_what-provides() {
 
     # Search for a module that provides $1
     current_pref=0
-    for hmd in $HESTIA/data/modules/*.hmd; do
+    for hmd in $HESTIA_INSTALL_DIR/../modules/*.hmd; do
         local mod_provides=$(osal_kv_read $hmd 'provides')
         if [ "$mod_provides" = "$1" ]; then
             if [ "$param_all" ]; then

+ 1 - 1
bin/v-rebuild-web-domains

@@ -70,7 +70,7 @@ fi
 
 # Create dummy php-fpm configs if missing
 for php_folder in $PHP_DIR_POOL_D_BASE/*; do
-    pool_d=$(osal_multiphp_fpm_pool_d ${php_folder})
+    pool_d=$(osal_php_fpm_pool_d ${php_folder})
     [ ! -d "$pool_d" ] && continue
 
     v_php="$(basename $php_folder)"

+ 6 - 0
bin/v-restart-service

@@ -57,6 +57,12 @@ for service in $service_list; do
             "$service" = "php7.2-fpm" -o \
             "$service" = "php7.3-fpm" -o \
             "$service" = "php7.4-fpm" -o \
+            "$service" = "php56-php-fpm" -o \
+            "$service" = "php70-php-fpm" -o \
+            "$service" = "php71-php-fpm" -o \
+            "$service" = "php72-php-fpm" -o \
+            "$service" = "php73-php-fpm" -o \
+            "$service" = "php74-php-fpm" -o \
             "$service" = "proftpd" -o    \
             "$service" = "ssh" -o       \
             "$service" = "fail2ban" ]; then

+ 3 - 2
bin/v-restart-web-backend

@@ -11,6 +11,7 @@
 
 # Includes
 source $HESTIA/func/main.sh
+source $HESTIA/func/osal.sh
 source $HESTIA/conf/hestia.conf
 PATH="$PATH:/usr/local/sbin:/sbin:/usr/sbin:/root/bin"
 
@@ -45,11 +46,11 @@ fi
 
 tmpfile=$(mktemp)
 for php_folder in $PHP_DIR_POOL_D_BASE/*; do
-    pool_d=$(osal_multiphp_fpm_pool_d ${php_folder})
+    pool_d=$(osal_php_fpm_pool_d ${php_folder})
     [ ! -d "$pool_d" ] && continue
 
     v_php="$(basename $php_folder)"
-    v_phpfpm="php${v_php}-fpm"
+    v_phpfpm="$(osal_php_package_prefix ${v_php})-fpm"
 
     if [ ! -f "$pool_d/dummy.conf" ]; then
         cp -f "$HESTIA_INSTALL_DIR/php-fpm/dummy.conf" "$pool_d/"

+ 2 - 2
func/domain.sh

@@ -94,12 +94,12 @@ prepare_web_backend() {
     echo 1
         backend_version="${BASH_REMATCH[1]}.${BASH_REMATCH[2]}"
         #pool=$(find -L /etc/php/$backend_version -type d \( -name "pool.d" -o -name "*fpm.d" \))
-        pool=$(osal_multiphp_fpm_pool_d $backend_version)
+        pool=$(osal_php_fpm_pool_d $backend_version)
     else
         backend_version=$(multiphp_default_version)
         if [ -z "$pool" ] || [ -z "$BACKEND" ]; then
             #pool=$(find -L /etc/php/$backend_version -type d \( -name "pool.d" -o -name "*fpm.d" \))
-            pool=$(osal_multiphp_fpm_pool_d $backend_version)
+            pool=$(osal_php_fpm_pool_d $backend_version)
         fi
     fi
  

+ 3 - 3
func/osal_debian_based.sh

@@ -134,12 +134,12 @@ osal_apache_module_disable() {
 }
 
 # multiphp_php_package_prefix 7.3 = 'php7.3'
-osal_multiphp_php_package_prefix() {
+osal_php_package_prefix() {
     echo "php${1}"
 }
 
 # multiphp_fpm_isinstalled 7.3 = (1|null)
-osal_multiphp_fpm_isinstalled() {
+osal_php_fpm_isinstalled() {
     [ -f "/etc/init.d/php$1-fpm" ] && echo 1
 }
 
@@ -150,6 +150,6 @@ multiphp_etc_folder() {
 
 # Returns PHP-FPM directory for a given PHP version
 # multiphp_fpm_pool_d '7.3' = /etc/php/7.3/fpm/pool.d
-osal_multiphp_fpm_pool_d() {
+osal_php_fpm_pool_d() {
     echo $PHP_DIR_POOL_D_BASE/$1/fpm/pool.d
 }

+ 4 - 4
func/osal_rhel_based.sh

@@ -138,13 +138,13 @@ osal_apache_module_disable() {
 }
 
 # multiphp_php_package_prefix 7.3 = 'php73-php'
-osal_multiphp_php_package_prefix() {
+osal_php_package_prefix() {
     echo php${1//.}-php
 }
 
 # multiphp_fpm_isinstalled 7.3 = (1|null)
-osal_multiphp_fpm_isinstalled() {
-    php_prefix=$(osal_multiphp_php_package_prefix $1)
+osal_php_fpm_isinstalled() {
+    php_prefix=$(osal_php_package_prefix $1)
     rpm -q --quiet ${php_prefix}-fpm && echo 1
 }
 
@@ -155,7 +155,7 @@ osal_multiphp_etc_folder() {
 
 # Returns PHP-FPM directory for a given PHP version
 # multiphp_fpm_pool_d '7.3' = /etc/opt/remi/php73/php-fpm.d
-osal_multiphp_fpm_pool_d() {
+osal_php_fpm_pool_d() {
     local numbersonly=${1//.}       # Remove . in 7.3
     numbersonly=${numbersonly#php}  # Remove php in php73
     echo $PHP_DIR_POOL_D_BASE/php${numbersonly}/php-fpm.d

+ 1 - 1
install/rhel/multiphp/httpd/PHP-56.sh

@@ -8,7 +8,7 @@ docroot="$5"
 
 pool_conf="[$2]
 
-listen = /run/php/php5.6-fpm-$2.sock
+listen = /run/php-fpm/php5.6-fpm-$2.sock
 listen.owner = $1
 listen.group = apache
 listen.mode = 0660

+ 1 - 1
install/rhel/multiphp/httpd/PHP-56.stpl

@@ -26,7 +26,7 @@
     %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
 
     <FilesMatch \.php$>
-        SetHandler "proxy:unix:/run/php/php5.6-fpm-%domain%.sock|fcgi://localhost"
+        SetHandler "proxy:unix:/run/php-fpm/php5.6-fpm-%domain%.sock|fcgi://localhost"
     </FilesMatch>
     SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
 

+ 1 - 1
install/rhel/multiphp/httpd/PHP-56.tpl

@@ -23,7 +23,7 @@
     </Directory>
 
     <FilesMatch \.php$>
-        SetHandler "proxy:unix:/run/php/php5.6-fpm-%domain%.sock|fcgi://localhost"
+        SetHandler "proxy:unix:/run/php-fpm/php5.6-fpm-%domain%.sock|fcgi://localhost"
     </FilesMatch>
     SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
 

+ 1 - 1
install/rhel/multiphp/httpd/PHP-70.sh

@@ -8,7 +8,7 @@ docroot="$5"
 
 pool_conf="[$2]
 
-listen = /run/php/php7.0-fpm-$2.sock
+listen = /run/php-fpm/php7.0-fpm-$2.sock
 listen.owner = $1
 listen.group = apache
 listen.mode = 0660

+ 1 - 1
install/rhel/multiphp/httpd/PHP-70.stpl

@@ -26,7 +26,7 @@
     %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
 
     <FilesMatch \.php$>
-        SetHandler "proxy:unix:/run/php/php7.0-fpm-%domain%.sock|fcgi://localhost"
+        SetHandler "proxy:unix:/run/php-fpm/php7.0-fpm-%domain%.sock|fcgi://localhost"
     </FilesMatch>
     SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
 

+ 1 - 1
install/rhel/multiphp/httpd/PHP-70.tpl

@@ -23,7 +23,7 @@
     </Directory>
 
     <FilesMatch \.php$>
-        SetHandler "proxy:unix:/run/php/php7.0-fpm-%domain%.sock|fcgi://localhost"
+        SetHandler "proxy:unix:/run/php-fpm/php7.0-fpm-%domain%.sock|fcgi://localhost"
     </FilesMatch>
     SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
 

+ 1 - 1
install/rhel/multiphp/httpd/PHP-71.sh

@@ -8,7 +8,7 @@ docroot="$5"
 
 pool_conf="[$2]
 
-listen = /run/php/php7.1-fpm-$2.sock
+listen = /run/php-fpm/php7.1-fpm-$2.sock
 listen.owner = $1
 listen.group = apache
 listen.mode = 0660

+ 1 - 1
install/rhel/multiphp/httpd/PHP-71.stpl

@@ -26,7 +26,7 @@
     %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
 
     <FilesMatch \.php$>
-        SetHandler "proxy:unix:/run/php/php7.1-fpm-%domain%.sock|fcgi://localhost"
+        SetHandler "proxy:unix:/run/php-fpm/php7.1-fpm-%domain%.sock|fcgi://localhost"
     </FilesMatch>
     SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
 

+ 1 - 1
install/rhel/multiphp/httpd/PHP-71.tpl

@@ -23,7 +23,7 @@
     </Directory>
 
     <FilesMatch \.php$>
-        SetHandler "proxy:unix:/run/php/php7.1-fpm-%domain%.sock|fcgi://localhost"
+        SetHandler "proxy:unix:/run/php-fpm/php7.1-fpm-%domain%.sock|fcgi://localhost"
     </FilesMatch>
     SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
 

+ 1 - 1
install/rhel/multiphp/httpd/PHP-72.sh

@@ -8,7 +8,7 @@ docroot="$5"
 
 pool_conf="[$2]
 
-listen = /run/php/php7.2-fpm-$2.sock
+listen = /run/php-fpm/php7.2-fpm-$2.sock
 listen.owner = $1
 listen.group = apache
 listen.mode = 0660

+ 1 - 1
install/rhel/multiphp/httpd/PHP-72.stpl

@@ -26,7 +26,7 @@
     %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
 
     <FilesMatch \.php$>
-        SetHandler "proxy:unix:/run/php/php7.2-fpm-%domain%.sock|fcgi://localhost"
+        SetHandler "proxy:unix:/run/php-fpm/php7.2-fpm-%domain%.sock|fcgi://localhost"
     </FilesMatch>
     SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
 

+ 1 - 1
install/rhel/multiphp/httpd/PHP-72.tpl

@@ -23,7 +23,7 @@
     </Directory>
 
     <FilesMatch \.php$>
-        SetHandler "proxy:unix:/run/php/php7.2-fpm-%domain%.sock|fcgi://localhost"
+        SetHandler "proxy:unix:/run/php-fpm/php7.2-fpm-%domain%.sock|fcgi://localhost"
     </FilesMatch>
     SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
 

+ 7 - 7
install/rhel/multiphp/httpd/PHP-73.sh

@@ -8,7 +8,7 @@ docroot="$5"
 
 pool_conf="[$2]
 
-listen = /run/php/php7.3-fpm-$2.sock
+listen = /run/php-fpm/php7.3-fpm-$2.sock
 listen.owner = $1
 listen.group = apache
 listen.mode = 0660
@@ -39,12 +39,12 @@ env[TMPDIR] = /home/$1/tmp
 env[TEMP] = /home/$1/tmp
 "
 
-pool_file_56="/etc/php/5.6/fpm/pool.d/$2.conf"
-pool_file_70="/etc/php/7.0/fpm/pool.d/$2.conf"
-pool_file_71="/etc/php/7.1/fpm/pool.d/$2.conf"
-pool_file_72="/etc/php/7.2/fpm/pool.d/$2.conf"
-pool_file_73="/etc/php/7.3/fpm/pool.d/$2.conf"
-pool_file_74="/etc/php/7.4/fpm/pool.d/$2.conf"
+pool_file_56="/etc/opt/remi/php56/php-fpm.d/$2.conf"
+pool_file_70="/etc/opt/remi/php70/php-fpm.d/$2.conf"
+pool_file_71="/etc/opt/remi/php71/php-fpm.d/$2.conf"
+pool_file_72="/etc/opt/remi/php72/php-fpm.d/$2.conf"
+pool_file_73="/etc/opt/remi/php73/php-fpm.d/$2.conf"
+pool_file_74="/etc/opt/remi/php74/php-fpm.d/$2.conf"
 
 if [ -f "$pool_file_56" ]; then
     rm $pool_file_56

+ 1 - 1
install/rhel/multiphp/httpd/PHP-73.stpl

@@ -26,7 +26,7 @@
     %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
 
     <FilesMatch \.php$>
-        SetHandler "proxy:unix:/run/php/php7.3-fpm-%domain%.sock|fcgi://localhost"
+        SetHandler "proxy:unix:/run/php-fpm/php7.3-fpm-%domain%.sock|fcgi://localhost"
     </FilesMatch>
     SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
 

+ 1 - 1
install/rhel/multiphp/httpd/PHP-73.tpl

@@ -23,7 +23,7 @@
     </Directory>
 
     <FilesMatch \.php$>
-        SetHandler "proxy:unix:/run/php/php7.3-fpm-%domain%.sock|fcgi://localhost"
+        SetHandler "proxy:unix:/run/php-fpm/php7.3-fpm-%domain%.sock|fcgi://localhost"
     </FilesMatch>
     SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
 

+ 7 - 7
install/rhel/multiphp/httpd/PHP-74.sh

@@ -8,7 +8,7 @@ docroot="$5"
 
 pool_conf="[$2]
 
-listen = /run/php/php7.4-fpm-$2.sock
+listen = /run/php-fpm/php7.4-fpm-$2.sock
 listen.owner = $1
 listen.group = apache
 listen.mode = 0660
@@ -39,12 +39,12 @@ env[TMPDIR] = /home/$1/tmp
 env[TEMP] = /home/$1/tmp
 "
 
-pool_file_56="/etc/php/5.6/fpm/pool.d/$2.conf"
-pool_file_70="/etc/php/7.0/fpm/pool.d/$2.conf"
-pool_file_71="/etc/php/7.1/fpm/pool.d/$2.conf"
-pool_file_72="/etc/php/7.2/fpm/pool.d/$2.conf"
-pool_file_73="/etc/php/7.3/fpm/pool.d/$2.conf"
-pool_file_74="/etc/php/7.4/fpm/pool.d/$2.conf"
+pool_file_56="/etc/opt/remi/php56/php-fpm.d/$2.conf"
+pool_file_70="/etc/opt/remi/php70/php-fpm.d/$2.conf"
+pool_file_71="/etc/opt/remi/php71/php-fpm.d/$2.conf"
+pool_file_72="/etc/opt/remi/php72/php-fpm.d/$2.conf"
+pool_file_73="/etc/opt/remi/php73/php-fpm.d/$2.conf"
+pool_file_74="/etc/opt/remi/php74/php-fpm.d/$2.conf"
 
 if [ -f "$pool_file_56" ]; then
     rm $pool_file_56

+ 1 - 1
install/rhel/multiphp/httpd/PHP-74.stpl

@@ -26,7 +26,7 @@
     %ssl_ca_str%SSLCertificateChainFile %ssl_ca%
 
     <FilesMatch \.php$>
-        SetHandler "proxy:unix:/run/php/php7.4-fpm-%domain%.sock|fcgi://localhost"
+        SetHandler "proxy:unix:/run/php-fpm/php7.4-fpm-%domain%.sock|fcgi://localhost"
     </FilesMatch>
     SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
 

+ 1 - 1
install/rhel/multiphp/httpd/PHP-74.tpl

@@ -23,7 +23,7 @@
     </Directory>
 
     <FilesMatch \.php$>
-        SetHandler "proxy:unix:/run/php/php7.4-fpm-%domain%.sock|fcgi://localhost"
+        SetHandler "proxy:unix:/run/php-fpm/php7.4-fpm-%domain%.sock|fcgi://localhost"
     </FilesMatch>
     SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
 

+ 1 - 1
install/rhel/multiphp/nginx/PHP-56.sh

@@ -8,7 +8,7 @@ docroot="$5"
 
 pool_conf="[$2]
 
-listen = /run/php/php5.6-fpm-$2.sock
+listen = /run/php-fpm/php5.6-fpm-$2.sock
 listen.owner = $1
 listen.group = apache
 listen.mode = 0660

+ 1 - 1
install/rhel/multiphp/nginx/PHP-56.stpl

@@ -27,7 +27,7 @@ server {
                 return  404;
             }
 
-            fastcgi_pass    unix:/run/php/php5.6-fpm-%domain%.sock;
+            fastcgi_pass    unix:/run/php-fpm/php5.6-fpm-%domain%.sock;
             fastcgi_index   index.php;
             include         /etc/nginx/fastcgi_params;
         }

+ 1 - 1
install/rhel/multiphp/nginx/PHP-56.tpl

@@ -22,7 +22,7 @@ server {
                 return  404;
             }
 
-            fastcgi_pass    unix:/run/php/php5.6-fpm-%domain%.sock;
+            fastcgi_pass    unix:/run/php-fpm/php5.6-fpm-%domain%.sock;
             fastcgi_index   index.php;
             include         /etc/nginx/fastcgi_params;
         }

+ 1 - 1
install/rhel/multiphp/nginx/PHP-70.sh

@@ -8,7 +8,7 @@ docroot="$5"
 
 pool_conf="[$2]
 
-listen = /run/php/php7.0-fpm-$2.sock
+listen = /run/php-fpm/php7.0-fpm-$2.sock
 listen.owner = $1
 listen.group = apache
 listen.mode = 0660

+ 1 - 1
install/rhel/multiphp/nginx/PHP-70.stpl

@@ -27,7 +27,7 @@ server {
                 return  404;
             }
 
-            fastcgi_pass    unix:/run/php/php7.0-fpm-%domain%.sock;
+            fastcgi_pass    unix:/run/php-fpm/php7.0-fpm-%domain%.sock;
             fastcgi_index   index.php;
             include         /etc/nginx/fastcgi_params;
         }

+ 1 - 1
install/rhel/multiphp/nginx/PHP-70.tpl

@@ -22,7 +22,7 @@ server {
                 return  404;
             }
 
-            fastcgi_pass    unix:/run/php/php7.0-fpm-%domain%.sock;
+            fastcgi_pass    unix:/run/php-fpm/php7.0-fpm-%domain%.sock;
             fastcgi_index   index.php;
             include         /etc/nginx/fastcgi_params;
         }

+ 1 - 1
install/rhel/multiphp/nginx/PHP-71.sh

@@ -8,7 +8,7 @@ docroot="$5"
 
 pool_conf="[$2]
 
-listen = /run/php/php7.1-fpm-$2.sock
+listen = /run/php-fpm/php7.1-fpm-$2.sock
 listen.owner = $1
 listen.group = apache
 listen.mode = 0660

+ 1 - 1
install/rhel/multiphp/nginx/PHP-71.stpl

@@ -27,7 +27,7 @@ server {
                 return  404;
             }
 
-            fastcgi_pass    unix:/run/php/php7.1-fpm-%domain%.sock;
+            fastcgi_pass    unix:/run/php-fpm/php7.1-fpm-%domain%.sock;
             fastcgi_index   index.php;
             include         /etc/nginx/fastcgi_params;
         }

+ 1 - 1
install/rhel/multiphp/nginx/PHP-71.tpl

@@ -22,7 +22,7 @@ server {
                 return  404;
             }
 
-            fastcgi_pass    unix:/run/php/php7.1-fpm-%domain%.sock;
+            fastcgi_pass    unix:/run/php-fpm/php7.1-fpm-%domain%.sock;
             fastcgi_index   index.php;
             include         /etc/nginx/fastcgi_params;
         }

+ 1 - 1
install/rhel/multiphp/nginx/PHP-72.sh

@@ -8,7 +8,7 @@ docroot="$5"
 
 pool_conf="[$2]
 
-listen = /run/php/php7.2-fpm-$2.sock
+listen = /run/php-fpm/php7.2-fpm-$2.sock
 listen.owner = $1
 listen.group = apache
 listen.mode = 0660

+ 1 - 1
install/rhel/multiphp/nginx/PHP-72.stpl

@@ -27,7 +27,7 @@ server {
                 return  404;
             }
 
-            fastcgi_pass    unix:/run/php/php7.2-fpm-%domain%.sock;
+            fastcgi_pass    unix:/run/php-fpm/php7.2-fpm-%domain%.sock;
             fastcgi_index   index.php;
             include         /etc/nginx/fastcgi_params;
         }

+ 1 - 1
install/rhel/multiphp/nginx/PHP-72.tpl

@@ -22,7 +22,7 @@ server {
                 return  404;
             }
 
-            fastcgi_pass    unix:/run/php/php7.2-fpm-%domain%.sock;
+            fastcgi_pass    unix:/run/php-fpm/php7.2-fpm-%domain%.sock;
             fastcgi_index   index.php;
             include         /etc/nginx/fastcgi_params;
         }

+ 1 - 1
install/rhel/multiphp/nginx/PHP-73.sh

@@ -8,7 +8,7 @@ docroot="$5"
 
 pool_conf="[$2]
 
-listen = /run/php/php7.3-fpm-$2.sock
+listen = /run/php-fpm/php7.3-fpm-$2.sock
 listen.owner = $1
 listen.group = apache
 listen.mode = 0660

+ 1 - 1
install/rhel/multiphp/nginx/PHP-73.stpl

@@ -27,7 +27,7 @@ server {
                 return  404;
             }
 
-            fastcgi_pass    unix:/run/php/php7.3-fpm-%domain%.sock;
+            fastcgi_pass    unix:/run/php-fpm/php7.3-fpm-%domain%.sock;
             fastcgi_index   index.php;
             include         /etc/nginx/fastcgi_params;
         }

+ 1 - 1
install/rhel/multiphp/nginx/PHP-73.tpl

@@ -22,7 +22,7 @@ server {
                 return  404;
             }
 
-            fastcgi_pass    unix:/run/php/php7.3-fpm-%domain%.sock;
+            fastcgi_pass    unix:/run/php-fpm/php7.3-fpm-%domain%.sock;
             fastcgi_index   index.php;
             include         /etc/nginx/fastcgi_params;
         }

+ 1 - 1
install/rhel/multiphp/nginx/PHP-74.sh

@@ -8,7 +8,7 @@ docroot="$5"
 
 pool_conf="[$2]
 
-listen = /run/php/php7.4-fpm-$2.sock
+listen = /run/php-fpm/php7.4-fpm-$2.sock
 listen.owner = $1
 listen.group = apache
 listen.mode = 0660

+ 1 - 1
install/rhel/multiphp/nginx/PHP-74.stpl

@@ -27,7 +27,7 @@ server {
                 return  404;
             }
 
-            fastcgi_pass    unix:/run/php/php7.4-fpm-%domain%.sock;
+            fastcgi_pass    unix:/run/php-fpm/php7.4-fpm-%domain%.sock;
             fastcgi_index   index.php;
             include         /etc/nginx/fastcgi_params;
         }

+ 1 - 1
install/rhel/multiphp/nginx/PHP-74.tpl

@@ -22,7 +22,7 @@ server {
                 return  404;
             }
 
-            fastcgi_pass    unix:/run/php/php7.4-fpm-%domain%.sock;
+            fastcgi_pass    unix:/run/php-fpm/php7.4-fpm-%domain%.sock;
             fastcgi_index   index.php;
             include         /etc/nginx/fastcgi_params;
         }

+ 1 - 1
install/rhel/php-fpm/multiphp.tpl

@@ -1,7 +1,7 @@
 ; origin-src: deb/php-fpm/multiphp.tpl
 
 [%domain%]
-listen = /run/php/php%backend_version%-fpm-%domain%.sock
+listen = /run/php-fpm/php%backend_version%-fpm-%domain%.sock
 listen.owner = %user%
 listen.group = apache
 listen.mode = 0660

+ 1 - 1
install/rhel/templates/web/php-fpm/default.tpl

@@ -1,7 +1,7 @@
 ; origin-src: deb/templates/web/php-fpm/default.tpl
 
 [%backend%]
-listen = /run/php/php%backend_version%-fpm-%domain%.sock
+listen = /run/php-fpm/php%backend_version%-fpm-%domain%.sock
 listen.owner = %user%
 listen.group = apache
 listen.mode = 0660

+ 1 - 1
install/rhel/templates/web/php-fpm/no-php.tpl

@@ -1,7 +1,7 @@
 ; origin-src: deb/templates/web/php-fpm/no-php.tpl
 
 ;[%backend%]
-;listen = /var/run/php/%backend%.sock
+;listen = /var/run/php-fpm/%backend%.sock
 ;listen.owner = %user%
 ;listen.group = apache
 ;listen.mode = 0660

+ 1 - 1
install/rhel/templates/web/php-fpm/socket.tpl

@@ -1,7 +1,7 @@
 ; origin-src: deb/templates/web/php-fpm/socket.tpl
 
 [%backend%]
-listen = /var/run/php/%backend%.sock
+listen = /var/run/php-fpm/%backend%.sock
 listen.owner = %user%
 listen.group = apache
 listen.mode = 0660