mirror of
https://github.com/myvesta/vesta
synced 2025-07-06 04:51:54 -07:00
debian12 php8.2 templates
This commit is contained in:
parent
b5ccfbed82
commit
af61d62c47
6 changed files with 66 additions and 70 deletions
44
install/debian/12/templates/web/apache2/PHP-FPM-74-public.sh → install/debian/12/templates/web/apache2/PHP-FPM-82-public.sh
Executable file → Normal file
44
install/debian/12/templates/web/apache2/PHP-FPM-74-public.sh → install/debian/12/templates/web/apache2/PHP-FPM-82-public.sh
Executable file → Normal file
|
@ -8,7 +8,7 @@ docroot="$5"
|
||||||
|
|
||||||
pool_conf="[$2]
|
pool_conf="[$2]
|
||||||
|
|
||||||
listen = /run/php/php7.4-fpm-$2.sock
|
listen = /run/php/php8.2-fpm-$2.sock
|
||||||
listen.owner = $1
|
listen.owner = $1
|
||||||
listen.group = $1
|
listen.group = $1
|
||||||
listen.mode = 0666
|
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_73="/etc/php/7.3/fpm/pool.d/$2.conf"
|
||||||
pool_file_74="/etc/php/7.4/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_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
|
if [ -f "$pool_file_56" ]; then
|
||||||
rm $pool_file_56
|
rm $pool_file_56
|
||||||
|
@ -78,23 +80,11 @@ if [ -f "$pool_file_73" ]; then
|
||||||
systemctl restart php7.3-fpm
|
systemctl restart php7.3-fpm
|
||||||
fi
|
fi
|
||||||
|
|
||||||
write_file=0
|
if [ -f "$pool_file_74" ]; then
|
||||||
if [ ! -f "$pool_file_74" ]; then
|
rm $pool_file_74
|
||||||
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
|
|
||||||
systemctl reset-failed php7.4-fpm
|
systemctl reset-failed php7.4-fpm
|
||||||
systemctl restart php7.4-fpm
|
systemctl restart php7.4-fpm
|
||||||
fi
|
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
|
if [ -f "$pool_file_80" ]; then
|
||||||
rm $pool_file_80
|
rm $pool_file_80
|
||||||
|
@ -102,4 +92,28 @@ if [ -f "$pool_file_80" ]; then
|
||||||
systemctl restart php8.0-fpm
|
systemctl restart php8.0-fpm
|
||||||
fi
|
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
|
exit 0
|
|
@ -17,24 +17,16 @@
|
||||||
<Directory %sdocroot%>
|
<Directory %sdocroot%>
|
||||||
AllowOverride All
|
AllowOverride All
|
||||||
SSLRequireSSL
|
SSLRequireSSL
|
||||||
Options +Includes -Indexes +ExecCGI
|
Options +Includes -Indexes -FollowSymLinks +SymLinksIfOwnerMatch
|
||||||
</Directory>
|
</Directory>
|
||||||
SSLEngine on
|
SSLEngine on
|
||||||
SSLVerifyClient none
|
SSLVerifyClient none
|
||||||
SSLCertificateFile %ssl_crt%
|
SSLCertificateFile %ssl_crt%
|
||||||
SSLCertificateKeyFile %ssl_key%
|
SSLCertificateKeyFile %ssl_key%
|
||||||
%ssl_ca_str%SSLCertificateChainFile %ssl_ca%
|
%ssl_ca_str%SSLCertificateChainFile %ssl_ca%
|
||||||
# <IfModule mod_ruid2.c>
|
|
||||||
# RMode config
|
|
||||||
# RUidGid %user% %group%
|
|
||||||
# RGroups www-data
|
|
||||||
# </IfModule>
|
|
||||||
# <IfModule itk.c>
|
|
||||||
# AssignUserID %user% %group%
|
|
||||||
# </IfModule>
|
|
||||||
|
|
||||||
<FilesMatch \.php$>
|
<FilesMatch \.php$>
|
||||||
SetHandler "proxy:unix:/run/php/php7.4-fpm-%domain%.sock|fcgi://localhost/"
|
SetHandler "proxy:unix:/run/php/php8.2-fpm-%domain%.sock|fcgi://localhost/"
|
||||||
</FilesMatch>
|
</FilesMatch>
|
||||||
SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
|
SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
|
||||||
|
|
|
@ -16,19 +16,11 @@
|
||||||
</Directory>
|
</Directory>
|
||||||
<Directory %sdocroot%>
|
<Directory %sdocroot%>
|
||||||
AllowOverride All
|
AllowOverride All
|
||||||
Options +Includes -Indexes +ExecCGI
|
Options +Includes -Indexes -FollowSymLinks +SymLinksIfOwnerMatch
|
||||||
</Directory>
|
</Directory>
|
||||||
# <IfModule mod_ruid2.c>
|
|
||||||
# RMode config
|
|
||||||
# RUidGid %user% %group%
|
|
||||||
# RGroups www-data
|
|
||||||
# </IfModule>
|
|
||||||
# <IfModule itk.c>
|
|
||||||
# AssignUserID %user% %group%
|
|
||||||
# </IfModule>
|
|
||||||
|
|
||||||
<FilesMatch \.php$>
|
<FilesMatch \.php$>
|
||||||
SetHandler "proxy:unix:/run/php/php7.4-fpm-%domain%.sock|fcgi://localhost/"
|
SetHandler "proxy:unix:/run/php/php8.2-fpm-%domain%.sock|fcgi://localhost/"
|
||||||
</FilesMatch>
|
</FilesMatch>
|
||||||
SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
|
SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
|
||||||
|
|
44
install/debian/12/templates/web/apache2/PHP-FPM-74.sh → install/debian/12/templates/web/apache2/PHP-FPM-82.sh
Executable file → Normal file
44
install/debian/12/templates/web/apache2/PHP-FPM-74.sh → install/debian/12/templates/web/apache2/PHP-FPM-82.sh
Executable file → Normal file
|
@ -8,7 +8,7 @@ docroot="$5"
|
||||||
|
|
||||||
pool_conf="[$2]
|
pool_conf="[$2]
|
||||||
|
|
||||||
listen = /run/php/php7.4-fpm-$2.sock
|
listen = /run/php/php8.2-fpm-$2.sock
|
||||||
listen.owner = $1
|
listen.owner = $1
|
||||||
listen.group = $1
|
listen.group = $1
|
||||||
listen.mode = 0666
|
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_73="/etc/php/7.3/fpm/pool.d/$2.conf"
|
||||||
pool_file_74="/etc/php/7.4/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_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
|
if [ -f "$pool_file_56" ]; then
|
||||||
rm $pool_file_56
|
rm $pool_file_56
|
||||||
|
@ -78,23 +80,11 @@ if [ -f "$pool_file_73" ]; then
|
||||||
systemctl restart php7.3-fpm
|
systemctl restart php7.3-fpm
|
||||||
fi
|
fi
|
||||||
|
|
||||||
write_file=0
|
if [ -f "$pool_file_74" ]; then
|
||||||
if [ ! -f "$pool_file_74" ]; then
|
rm $pool_file_74
|
||||||
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
|
|
||||||
systemctl reset-failed php7.4-fpm
|
systemctl reset-failed php7.4-fpm
|
||||||
systemctl restart php7.4-fpm
|
systemctl restart php7.4-fpm
|
||||||
fi
|
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
|
if [ -f "$pool_file_80" ]; then
|
||||||
rm $pool_file_80
|
rm $pool_file_80
|
||||||
|
@ -102,4 +92,28 @@ if [ -f "$pool_file_80" ]; then
|
||||||
systemctl restart php8.0-fpm
|
systemctl restart php8.0-fpm
|
||||||
fi
|
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
|
exit 0
|
|
@ -17,24 +17,16 @@
|
||||||
<Directory %sdocroot%>
|
<Directory %sdocroot%>
|
||||||
AllowOverride All
|
AllowOverride All
|
||||||
SSLRequireSSL
|
SSLRequireSSL
|
||||||
Options +Includes -Indexes +ExecCGI
|
Options +Includes -Indexes -FollowSymLinks +SymLinksIfOwnerMatch
|
||||||
</Directory>
|
</Directory>
|
||||||
SSLEngine on
|
SSLEngine on
|
||||||
SSLVerifyClient none
|
SSLVerifyClient none
|
||||||
SSLCertificateFile %ssl_crt%
|
SSLCertificateFile %ssl_crt%
|
||||||
SSLCertificateKeyFile %ssl_key%
|
SSLCertificateKeyFile %ssl_key%
|
||||||
%ssl_ca_str%SSLCertificateChainFile %ssl_ca%
|
%ssl_ca_str%SSLCertificateChainFile %ssl_ca%
|
||||||
# <IfModule mod_ruid2.c>
|
|
||||||
# RMode config
|
|
||||||
# RUidGid %user% %group%
|
|
||||||
# RGroups www-data
|
|
||||||
# </IfModule>
|
|
||||||
# <IfModule itk.c>
|
|
||||||
# AssignUserID %user% %group%
|
|
||||||
# </IfModule>
|
|
||||||
|
|
||||||
<FilesMatch \.php$>
|
<FilesMatch \.php$>
|
||||||
SetHandler "proxy:unix:/run/php/php7.4-fpm-%domain%.sock|fcgi://localhost/"
|
SetHandler "proxy:unix:/run/php/php8.2-fpm-%domain%.sock|fcgi://localhost/"
|
||||||
</FilesMatch>
|
</FilesMatch>
|
||||||
SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
|
SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
|
||||||
|
|
|
@ -16,19 +16,11 @@
|
||||||
</Directory>
|
</Directory>
|
||||||
<Directory %sdocroot%>
|
<Directory %sdocroot%>
|
||||||
AllowOverride All
|
AllowOverride All
|
||||||
Options +Includes -Indexes +ExecCGI
|
Options +Includes -Indexes -FollowSymLinks +SymLinksIfOwnerMatch
|
||||||
</Directory>
|
</Directory>
|
||||||
# <IfModule mod_ruid2.c>
|
|
||||||
# RMode config
|
|
||||||
# RUidGid %user% %group%
|
|
||||||
# RGroups www-data
|
|
||||||
# </IfModule>
|
|
||||||
# <IfModule itk.c>
|
|
||||||
# AssignUserID %user% %group%
|
|
||||||
# </IfModule>
|
|
||||||
|
|
||||||
<FilesMatch \.php$>
|
<FilesMatch \.php$>
|
||||||
SetHandler "proxy:unix:/run/php/php7.4-fpm-%domain%.sock|fcgi://localhost/"
|
SetHandler "proxy:unix:/run/php/php8.2-fpm-%domain%.sock|fcgi://localhost/"
|
||||||
</FilesMatch>
|
</FilesMatch>
|
||||||
SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
|
SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue