diff --git a/install/debian/12/templates/web/apache2/PHP-FPM-74-public.sh b/install/debian/12/templates/web/apache2/PHP-FPM-82-public.sh old mode 100755 new mode 100644 similarity index 79% rename from install/debian/12/templates/web/apache2/PHP-FPM-74-public.sh rename to install/debian/12/templates/web/apache2/PHP-FPM-82-public.sh index e72bb003..a4deb752 --- a/install/debian/12/templates/web/apache2/PHP-FPM-74-public.sh +++ b/install/debian/12/templates/web/apache2/PHP-FPM-82-public.sh @@ -8,7 +8,7 @@ docroot="$5" pool_conf="[$2] -listen = /run/php/php7.4-fpm-$2.sock +listen = /run/php/php8.2-fpm-$2.sock listen.owner = $1 listen.group = $1 listen.mode = 0666 @@ -47,6 +47,8 @@ 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_80="/etc/php/8.0/fpm/pool.d/$2.conf" +pool_file_81="/etc/php/8.1/fpm/pool.d/$2.conf" +pool_file_82="/etc/php/8.2/fpm/pool.d/$2.conf" if [ -f "$pool_file_56" ]; then rm $pool_file_56 @@ -78,23 +80,11 @@ if [ -f "$pool_file_73" ]; then systemctl restart php7.3-fpm fi -write_file=0 -if [ ! -f "$pool_file_74" ]; then - write_file=1 -else - user_count=$(grep -c "/home/$1/" $pool_file_74) - if [ $user_count -eq 0 ]; then - write_file=1 - fi -fi -if [ $write_file -eq 1 ]; then - echo "$pool_conf" > $pool_file_74 +if [ -f "$pool_file_74" ]; then + rm $pool_file_74 systemctl reset-failed php7.4-fpm systemctl restart php7.4-fpm fi -if [ -f "/etc/php/7.4/fpm/pool.d/www.conf" ]; then - rm /etc/php/7.4/fpm/pool.d/www.conf -fi if [ -f "$pool_file_80" ]; then rm $pool_file_80 @@ -102,4 +92,28 @@ if [ -f "$pool_file_80" ]; then systemctl restart php8.0-fpm fi +if [ -f "$pool_file_81" ]; then + rm $pool_file_81 + systemctl reset-failed php8.1-fpm + systemctl restart php8.1-fpm +fi + +write_file=0 +if [ ! -f "$pool_file_82" ]; then + write_file=1 +else + user_count=$(grep -c "/home/$1/" $pool_file_82) + if [ $user_count -eq 0 ]; then + write_file=1 + fi +fi +if [ $write_file -eq 1 ]; then + echo "$pool_conf" > $pool_file_82 + systemctl reset-failed php8.2-fpm + systemctl restart php8.2-fpm +fi +if [ -f "/etc/php/8.2/fpm/pool.d/www.conf" ]; then + rm /etc/php/8.2/fpm/pool.d/www.conf +fi + exit 0 diff --git a/install/debian/12/templates/web/apache2/PHP-FPM-74-public.stpl b/install/debian/12/templates/web/apache2/PHP-FPM-82-public.stpl similarity index 77% rename from install/debian/12/templates/web/apache2/PHP-FPM-74-public.stpl rename to install/debian/12/templates/web/apache2/PHP-FPM-82-public.stpl index fdbc26f9..809e7f33 100644 --- a/install/debian/12/templates/web/apache2/PHP-FPM-74-public.stpl +++ b/install/debian/12/templates/web/apache2/PHP-FPM-82-public.stpl @@ -17,24 +17,16 @@ AllowOverride All SSLRequireSSL - Options +Includes -Indexes +ExecCGI + Options +Includes -Indexes -FollowSymLinks +SymLinksIfOwnerMatch SSLEngine on SSLVerifyClient none SSLCertificateFile %ssl_crt% SSLCertificateKeyFile %ssl_key% %ssl_ca_str%SSLCertificateChainFile %ssl_ca% -# -# RMode config -# RUidGid %user% %group% -# RGroups www-data -# -# -# AssignUserID %user% %group% -# - SetHandler "proxy:unix:/run/php/php7.4-fpm-%domain%.sock|fcgi://localhost/" + SetHandler "proxy:unix:/run/php/php8.2-fpm-%domain%.sock|fcgi://localhost/" SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0 diff --git a/install/debian/12/templates/web/apache2/PHP-FPM-74-public.tpl b/install/debian/12/templates/web/apache2/PHP-FPM-82-public.tpl similarity index 74% rename from install/debian/12/templates/web/apache2/PHP-FPM-74-public.tpl rename to install/debian/12/templates/web/apache2/PHP-FPM-82-public.tpl index 614f20c3..679d1409 100644 --- a/install/debian/12/templates/web/apache2/PHP-FPM-74-public.tpl +++ b/install/debian/12/templates/web/apache2/PHP-FPM-82-public.tpl @@ -16,19 +16,11 @@ AllowOverride All - Options +Includes -Indexes +ExecCGI + Options +Includes -Indexes -FollowSymLinks +SymLinksIfOwnerMatch -# -# RMode config -# RUidGid %user% %group% -# RGroups www-data -# -# -# AssignUserID %user% %group% -# - SetHandler "proxy:unix:/run/php/php7.4-fpm-%domain%.sock|fcgi://localhost/" + SetHandler "proxy:unix:/run/php/php8.2-fpm-%domain%.sock|fcgi://localhost/" SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0 diff --git a/install/debian/12/templates/web/apache2/PHP-FPM-74.sh b/install/debian/12/templates/web/apache2/PHP-FPM-82.sh old mode 100755 new mode 100644 similarity index 79% rename from install/debian/12/templates/web/apache2/PHP-FPM-74.sh rename to install/debian/12/templates/web/apache2/PHP-FPM-82.sh index e72bb003..a4deb752 --- a/install/debian/12/templates/web/apache2/PHP-FPM-74.sh +++ b/install/debian/12/templates/web/apache2/PHP-FPM-82.sh @@ -8,7 +8,7 @@ docroot="$5" pool_conf="[$2] -listen = /run/php/php7.4-fpm-$2.sock +listen = /run/php/php8.2-fpm-$2.sock listen.owner = $1 listen.group = $1 listen.mode = 0666 @@ -47,6 +47,8 @@ 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_80="/etc/php/8.0/fpm/pool.d/$2.conf" +pool_file_81="/etc/php/8.1/fpm/pool.d/$2.conf" +pool_file_82="/etc/php/8.2/fpm/pool.d/$2.conf" if [ -f "$pool_file_56" ]; then rm $pool_file_56 @@ -78,23 +80,11 @@ if [ -f "$pool_file_73" ]; then systemctl restart php7.3-fpm fi -write_file=0 -if [ ! -f "$pool_file_74" ]; then - write_file=1 -else - user_count=$(grep -c "/home/$1/" $pool_file_74) - if [ $user_count -eq 0 ]; then - write_file=1 - fi -fi -if [ $write_file -eq 1 ]; then - echo "$pool_conf" > $pool_file_74 +if [ -f "$pool_file_74" ]; then + rm $pool_file_74 systemctl reset-failed php7.4-fpm systemctl restart php7.4-fpm fi -if [ -f "/etc/php/7.4/fpm/pool.d/www.conf" ]; then - rm /etc/php/7.4/fpm/pool.d/www.conf -fi if [ -f "$pool_file_80" ]; then rm $pool_file_80 @@ -102,4 +92,28 @@ if [ -f "$pool_file_80" ]; then systemctl restart php8.0-fpm fi +if [ -f "$pool_file_81" ]; then + rm $pool_file_81 + systemctl reset-failed php8.1-fpm + systemctl restart php8.1-fpm +fi + +write_file=0 +if [ ! -f "$pool_file_82" ]; then + write_file=1 +else + user_count=$(grep -c "/home/$1/" $pool_file_82) + if [ $user_count -eq 0 ]; then + write_file=1 + fi +fi +if [ $write_file -eq 1 ]; then + echo "$pool_conf" > $pool_file_82 + systemctl reset-failed php8.2-fpm + systemctl restart php8.2-fpm +fi +if [ -f "/etc/php/8.2/fpm/pool.d/www.conf" ]; then + rm /etc/php/8.2/fpm/pool.d/www.conf +fi + exit 0 diff --git a/install/debian/12/templates/web/apache2/PHP-FPM-74.stpl b/install/debian/12/templates/web/apache2/PHP-FPM-82.stpl similarity index 77% rename from install/debian/12/templates/web/apache2/PHP-FPM-74.stpl rename to install/debian/12/templates/web/apache2/PHP-FPM-82.stpl index df607247..e0d04794 100644 --- a/install/debian/12/templates/web/apache2/PHP-FPM-74.stpl +++ b/install/debian/12/templates/web/apache2/PHP-FPM-82.stpl @@ -17,24 +17,16 @@ AllowOverride All SSLRequireSSL - Options +Includes -Indexes +ExecCGI + Options +Includes -Indexes -FollowSymLinks +SymLinksIfOwnerMatch SSLEngine on SSLVerifyClient none SSLCertificateFile %ssl_crt% SSLCertificateKeyFile %ssl_key% %ssl_ca_str%SSLCertificateChainFile %ssl_ca% -# -# RMode config -# RUidGid %user% %group% -# RGroups www-data -# -# -# AssignUserID %user% %group% -# - SetHandler "proxy:unix:/run/php/php7.4-fpm-%domain%.sock|fcgi://localhost/" + SetHandler "proxy:unix:/run/php/php8.2-fpm-%domain%.sock|fcgi://localhost/" SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0 diff --git a/install/debian/12/templates/web/apache2/PHP-FPM-74.tpl b/install/debian/12/templates/web/apache2/PHP-FPM-82.tpl similarity index 74% rename from install/debian/12/templates/web/apache2/PHP-FPM-74.tpl rename to install/debian/12/templates/web/apache2/PHP-FPM-82.tpl index 7b6e2cb5..eba95935 100644 --- a/install/debian/12/templates/web/apache2/PHP-FPM-74.tpl +++ b/install/debian/12/templates/web/apache2/PHP-FPM-82.tpl @@ -16,19 +16,11 @@ AllowOverride All - Options +Includes -Indexes +ExecCGI + Options +Includes -Indexes -FollowSymLinks +SymLinksIfOwnerMatch -# -# RMode config -# RUidGid %user% %group% -# RGroups www-data -# -# -# AssignUserID %user% %group% -# - SetHandler "proxy:unix:/run/php/php7.4-fpm-%domain%.sock|fcgi://localhost/" + SetHandler "proxy:unix:/run/php/php8.2-fpm-%domain%.sock|fcgi://localhost/" SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0