1 |
jpp |
1.1 |
diff -Nur --no-dereference smeserver-php-3.0.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/95AddType00PHP2ibays smeserver-php-3.0.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/95AddType00PHP2ibays |
2 |
|
|
--- smeserver-php-3.0.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/95AddType00PHP2ibays 2021-03-08 01:54:56.143000000 -0500 |
3 |
|
|
+++ smeserver-php-3.0.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/95AddType00PHP2ibays 2021-03-08 02:18:36.512000000 -0500 |
4 |
|
|
@@ -16,9 +16,10 @@ |
5 |
|
|
{ |
6 |
|
|
my $version = PhpFpmVersionToUse($ibay); |
7 |
|
|
my $name = lc $key; |
8 |
|
|
+ my $FilesMathes = ( ($ibay->prop('AllowPHTML') || 'disabled') eq 'enabled' ) ? '(xml|phtml|html|htm|php|phar)': '(phar|php)'; |
9 |
|
|
$OUT .=<<"_EOF"; |
10 |
|
|
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=\$1 |
11 |
|
|
- <FilesMatch \\.php\$> |
12 |
|
|
+ <FilesMatch \\.$FilesMathes\$> |
13 |
|
|
<If "-f \%\{SCRIPT_FILENAME\}"> |
14 |
|
|
SetHandler "proxy:unix:/var/run/php-fpm/php$version-$name.sock|fcgi://localhost" |
15 |
|
|
</If> |
16 |
|
|
diff -Nur --no-dereference smeserver-php-3.0.0.old/root/etc/e-smith/templates/etc/php-fpm.d/ibays.conf/10Ibays smeserver-php-3.0.0/root/etc/e-smith/templates/etc/php-fpm.d/ibays.conf/10Ibays |
17 |
|
|
--- smeserver-php-3.0.0.old/root/etc/e-smith/templates/etc/php-fpm.d/ibays.conf/10Ibays 2021-03-08 01:54:56.139000000 -0500 |
18 |
|
|
+++ smeserver-php-3.0.0/root/etc/e-smith/templates/etc/php-fpm.d/ibays.conf/10Ibays 2021-03-08 02:18:38.742000000 -0500 |
19 |
|
|
@@ -26,8 +26,9 @@ |
20 |
|
|
'passthru,phpinfo,' . |
21 |
|
|
'escapeshellarg,escapeshellcmd'; |
22 |
|
|
my $autoprepend = $ibay->prop('PHPAutoPrependFile') || 'enabled'; |
23 |
|
|
- my $MailForceSender = $ibay->prop('MailForceSender') || "$name\@$DomainName"; |
24 |
|
|
- # TODO => check ibay associated domains. |
25 |
|
|
+ my $MailForceSender = $ibay->prop('MailForceSender') || "$name\@$DomainName"; # TODO => check ibay associated domains. |
26 |
|
|
+ my $limitExtensions = ( ($ibay->prop('AllowPHTML') || 'disabled') eq 'enabled' ) ? "security.limit_extensions= .php .htm .html .phar .phtml .xml " : ""; |
27 |
|
|
+ |
28 |
|
|
# Format vars |
29 |
|
|
my $autoprep = ( $autoprepend eq "disabled") ? "" : "/usr/share/php/auth_translation.php"; |
30 |
|
|
my $autoprepath = ( $autoprepend eq "disabled") ? "" : ",/usr/share/php/"; |
31 |
|
|
@@ -51,6 +52,7 @@ |
32 |
|
|
pm.min_spare_servers = 3 |
33 |
|
|
pm.max_spare_servers = 4 |
34 |
|
|
pm.max_requests = 1000 |
35 |
|
|
+$limitExtensions |
36 |
|
|
slowlog = /var/log/php/$key/slow.log |
37 |
|
|
php_admin_value[session.save_path] = /var/lib/php/$key/session |
38 |
|
|
php_admin_value[opcache.file_cache] = /var/lib/php/$key/opcache |