Skip to content

Commit fe85d7a

Browse files
authored
Merge pull request hestiacp#656 from hestiacp/php7.4
Merge PHP7.4 MultiPHP Templates
2 parents fbdcd5c + 2cb0ae3 commit fe85d7a

File tree

15 files changed

+389
-0
lines changed

15 files changed

+389
-0
lines changed

install/deb/multiphp/apache2/PHP-56.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,9 @@ if [ -f "$pool_file_73" ]; then
7070
service php7.3-fpm restart
7171
fi
7272

73+
if [ -f "$pool_file_74" ]; then
74+
rm $pool_file_74
75+
service php7.4-fpm restart
76+
fi
77+
7378
exit 0

install/deb/multiphp/apache2/PHP-70.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,9 @@ if [ -f "$pool_file_73" ]; then
7070
service php7.3-fpm restart
7171
fi
7272

73+
if [ -f "$pool_file_74" ]; then
74+
rm $pool_file_74
75+
service php7.4-fpm restart
76+
fi
77+
7378
exit 0

install/deb/multiphp/apache2/PHP-71.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,9 @@ if [ -f "$pool_file_73" ]; then
7070
service php7.3-fpm restart
7171
fi
7272

73+
if [ -f "$pool_file_74" ]; then
74+
rm $pool_file_74
75+
service php7.4-fpm restart
76+
fi
77+
7378
exit 0

install/deb/multiphp/apache2/PHP-72.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,9 @@ if [ -f "$pool_file_73" ]; then
7070
service php7.3-fpm restart
7171
fi
7272

73+
if [ -f "$pool_file_74" ]; then
74+
rm $pool_file_74
75+
service php7.4-fpm restart
76+
fi
77+
7378
exit 0

install/deb/multiphp/apache2/PHP-73.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,9 @@ if [ ! -f "$pool_file_73" ]; then
7070
service php7.3-fpm restart
7171
fi
7272

73+
if [ -f "$pool_file_74" ]; then
74+
rm $pool_file_74
75+
service php7.4-fpm restart
76+
fi
77+
7378
exit 0
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
#!/bin/bash
2+
# Adding php pool conf
3+
user="$1"
4+
domain="$2"
5+
ip="$3"
6+
home_dir="$4"
7+
docroot="$5"
8+
9+
pool_conf="[$2]
10+
11+
listen = /run/php/php7.4-fpm-$2.sock
12+
listen.owner = $1
13+
listen.group = www-data
14+
listen.mode = 0660
15+
16+
user = $1
17+
group = $1
18+
19+
pm = ondemand
20+
pm.max_children = 8
21+
pm.max_requests = 4000
22+
pm.process_idle_timeout = 10s
23+
pm.status_path = /status
24+
25+
php_admin_value[upload_tmp_dir] = /home/$1/tmp
26+
php_admin_value[session.save_path] = /home/$1/tmp
27+
php_admin_value[open_basedir] = $5:/home/$1/tmp:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail
28+
php_admin_value[upload_max_filesize] = 80M
29+
php_admin_value[max_execution_time] = 20
30+
php_admin_value[post_max_size] = 80M
31+
php_admin_value[memory_limit] = 256M
32+
php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f info@$2
33+
php_admin_flag[mysql.allow_persistent] = off
34+
php_admin_flag[safe_mode] = off
35+
36+
env[PATH] = /usr/local/bin:/usr/bin:/bin
37+
env[TMP] = /home/$1/tmp
38+
env[TMPDIR] = /home/$1/tmp
39+
env[TEMP] = /home/$1/tmp
40+
"
41+
42+
pool_file_56="/etc/php/5.6/fpm/pool.d/$2.conf"
43+
pool_file_70="/etc/php/7.0/fpm/pool.d/$2.conf"
44+
pool_file_71="/etc/php/7.1/fpm/pool.d/$2.conf"
45+
pool_file_72="/etc/php/7.2/fpm/pool.d/$2.conf"
46+
pool_file_73="/etc/php/7.3/fpm/pool.d/$2.conf"
47+
pool_file_73="/etc/php/7.4/fpm/pool.d/$2.conf"
48+
49+
if [ -f "$pool_file_56" ]; then
50+
rm $pool_file_56
51+
service php5.6-fpm restart
52+
fi
53+
54+
if [ -f "$pool_file_70" ]; then
55+
rm $pool_file_70
56+
service php7.0-fpm restart
57+
fi
58+
59+
if [ -f "$pool_file_71" ]; then
60+
rm $pool_file_71
61+
service php7.1-fpm restart
62+
fi
63+
64+
if [ -f "$pool_file_72" ]; then
65+
rm $pool_file_72
66+
service php7.2-fpm restart
67+
fi
68+
69+
if [ -f "$pool_file_73" ]; then
70+
rm $pool_file_73
71+
service php7.2-fpm restart
72+
fi
73+
74+
if [ ! -f "$pool_file_74" ]; then
75+
echo "$pool_conf" > $pool_file_74
76+
service php7.4-fpm restart
77+
fi
78+
79+
exit 0
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<VirtualHost %ip%:%web_ssl_port%>
2+
3+
ServerName %domain_idn%
4+
%alias_string%
5+
ServerAdmin %email%
6+
DocumentRoot %sdocroot%
7+
ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
8+
Alias /vstats/ %home%/%user%/web/%domain%/stats/
9+
Alias /error/ %home%/%user%/web/%domain%/document_errors/
10+
#SuexecUserGroup %user% %group%
11+
CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
12+
CustomLog /var/log/%web_system%/domains/%domain%.log combined
13+
ErrorLog /var/log/%web_system%/domains/%domain%.error.log
14+
<Directory %home%/%user%/web/%domain%/stats>
15+
AllowOverride All
16+
</Directory>
17+
<Directory %sdocroot%>
18+
AllowOverride All
19+
SSLRequireSSL
20+
Options +Includes -Indexes +ExecCGI
21+
</Directory>
22+
SSLEngine on
23+
SSLVerifyClient none
24+
SSLCertificateFile %ssl_crt%
25+
SSLCertificateKeyFile %ssl_key%
26+
%ssl_ca_str%SSLCertificateChainFile %ssl_ca%
27+
# <IfModule mod_ruid2.c>
28+
# RMode config
29+
# RUidGid %user% %group%
30+
# RGroups www-data
31+
# </IfModule>
32+
# <IfModule itk.c>
33+
# AssignUserID %user% %group%
34+
# </IfModule>
35+
36+
<FilesMatch \.php$>
37+
SetHandler "proxy:unix:/run/php/php7.4-fpm-%domain%.sock|fcgi://localhost/"
38+
</FilesMatch>
39+
SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
40+
41+
IncludeOptional %home%/%user%/conf/web/%domain%/%web_system%.ssl.conf_*
42+
43+
</VirtualHost>
44+
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<VirtualHost %ip%:%web_port%>
2+
3+
ServerName %domain_idn%
4+
%alias_string%
5+
ServerAdmin %email%
6+
DocumentRoot %docroot%
7+
ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
8+
Alias /vstats/ %home%/%user%/web/%domain%/stats/
9+
Alias /error/ %home%/%user%/web/%domain%/document_errors/
10+
#SuexecUserGroup %user% %group%
11+
CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
12+
CustomLog /var/log/%web_system%/domains/%domain%.log combined
13+
ErrorLog /var/log/%web_system%/domains/%domain%.error.log
14+
15+
IncludeOptional %home%/%user%/conf/web/%domain%/apache2.forcessl.conf*
16+
17+
<Directory %home%/%user%/web/%domain%/stats>
18+
AllowOverride All
19+
</Directory>
20+
<Directory %sdocroot%>
21+
AllowOverride All
22+
Options +Includes -Indexes +ExecCGI
23+
</Directory>
24+
# <IfModule mod_ruid2.c>
25+
# RMode config
26+
# RUidGid %user% %group%
27+
# RGroups www-data
28+
# </IfModule>
29+
# <IfModule itk.c>
30+
# AssignUserID %user% %group%
31+
# </IfModule>
32+
33+
<FilesMatch \.php$>
34+
SetHandler "proxy:unix:/run/php/php7.4-fpm-%domain%.sock|fcgi://localhost/"
35+
</FilesMatch>
36+
SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
37+
38+
IncludeOptional %home%/%user%/conf/web/%domain%/%web_system%.conf_*
39+
40+
</VirtualHost>
41+

install/deb/multiphp/nginx/PHP-56.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,9 @@ if [ -f "$pool_file_73" ]; then
7070
service php7.3-fpm restart
7171
fi
7272

73+
if [ -f "$pool_file_74" ]; then
74+
rm $pool_file_74
75+
service php7.4-fpm restart
76+
fi
77+
7378
exit 0

install/deb/multiphp/nginx/PHP-70.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,9 @@ if [ -f "$pool_file_73" ]; then
7070
service php7.3-fpm restart
7171
fi
7272

73+
if [ -f "$pool_file_74" ]; then
74+
rm $pool_file_74
75+
service php7.4-fpm restart
76+
fi
77+
7378
exit 0

0 commit comments

Comments
 (0)