From 75df7a25548b5dbf98ba9b329cd3af650b0aa43b Mon Sep 17 00:00:00 2001 From: alexey Date: Sat, 28 Mar 2026 20:16:08 +0300 Subject: [PATCH] Fixes for php remi --- func/domain.sh | 8 ++++++-- install/rpm/templates/web/httpd/phpfcgid.stpl | 9 +-------- install/rpm/templates/web/httpd/phpfcgid.tpl | 9 +-------- 3 files changed, 8 insertions(+), 18 deletions(-) diff --git a/func/domain.sh b/func/domain.sh index 566391b..7d73e77 100644 --- a/func/domain.sh +++ b/func/domain.sh @@ -425,14 +425,18 @@ add_web_config() { MOD_CONF="/etc/httpd/conf.modules.d/09-mod-php.conf" PHP_DEFAULT="/usr/bin/php-cgi" - php_ver=$(grep -m1 '^LoadModule php_module ' "$MOD_CONF" | grep -oP 'php\d{2}') + if [ -e $MOD_CONF ]; then + php_ver=$(grep -m1 '^LoadModule php_module ' "$MOD_CONF" | grep -oP 'php\d{2}') + else + php_ver=$(find /etc/httpd/conf.modules.d -maxdepth 1 -type f -name '*-php*-php.conf' -print -quit | sed -n 's/.*-\(php[0-9]\+\)-php\.conf$/\1/p') + fi php_cgi_path=$PHP_DEFAULT if [ -n "$php_ver" ]; then if [ -n "$php_type" ]; then php_cgi_path="/opt/brepo/${php_ver}/bin/php-cgi" else - php_cgi_path="/opt/remi/php${php_ver}/root/bin/php-cgi" + php_cgi_path="/opt/remi/${php_ver}/root/bin/php-cgi" fi fi diff --git a/install/rpm/templates/web/httpd/phpfcgid.stpl b/install/rpm/templates/web/httpd/phpfcgid.stpl index a9df6c0..d3eee86 100644 --- a/install/rpm/templates/web/httpd/phpfcgid.stpl +++ b/install/rpm/templates/web/httpd/phpfcgid.stpl @@ -43,12 +43,5 @@ IncludeOptional %home%/%user%/conf/web/%domain%/%web_system%.ssl.conf_* IncludeOptional /etc/httpd/conf.h.d/*.inc - - RMode config - RUidGid %user% %group% - RGroups apache - - - AssignUserID %user% %group% - + diff --git a/install/rpm/templates/web/httpd/phpfcgid.tpl b/install/rpm/templates/web/httpd/phpfcgid.tpl index dbcb825..52e891c 100644 --- a/install/rpm/templates/web/httpd/phpfcgid.tpl +++ b/install/rpm/templates/web/httpd/phpfcgid.tpl @@ -38,12 +38,5 @@ IncludeOptional %home%/%user%/conf/web/%domain%/%web_system%.conf_* IncludeOptional /etc/httpd/conf.h.d/*.inc - - RMode config - RUidGid %user% %group% - RGroups apache - - - AssignUserID %user% %group% - +