1 |
diff -Nur --no-dereference smeserver-phpldapadmin-1.5.0.old/createlinks smeserver-phpldapadmin-1.5.0/createlinks |
2 |
--- smeserver-phpldapadmin-1.5.0.old/createlinks 2014-06-21 12:53:47.000000000 -0400 |
3 |
+++ smeserver-phpldapadmin-1.5.0/createlinks 2021-06-01 12:51:13.224000000 -0400 |
4 |
@@ -14,3 +14,14 @@ |
5 |
templates2events("/etc/phpldapadmin/config.php", $event) |
6 |
} |
7 |
safe_symlink("/etc/e-smith/templates-default/template-begin-php", "root/etc/e-smith/templates/etc/phpldapadmin/config.php/template-begin"); |
8 |
+ |
9 |
+for my $event (qw( |
10 |
+ smeserver-phpldapadmin-update |
11 |
+ )) |
12 |
+ { |
13 |
+ templates2events("/etc/httpd/conf/httpd.conf", $event); |
14 |
+ templates2events("/etc/phpldapadmin/config.php", $event); |
15 |
+ templates2events("/etc/opt/remi/php74/php-fpm.d/www.conf", $event); |
16 |
+ safe_symlink("sigusr1", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith"); |
17 |
+ safe_symlink("reload-or-restart", "root/etc/e-smith/events/$event/services2adjust/php74-php-fpm"); |
18 |
+ } |
19 |
diff -Nur --no-dereference smeserver-phpldapadmin-1.5.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86Phpldapadmin smeserver-phpldapadmin-1.5.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86Phpldapadmin |
20 |
--- smeserver-phpldapadmin-1.5.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86Phpldapadmin 2014-06-21 12:53:47.000000000 -0400 |
21 |
+++ smeserver-phpldapadmin-1.5.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/86Phpldapadmin 2021-06-01 13:01:37.848000000 -0400 |
22 |
@@ -21,8 +21,10 @@ |
23 |
AuthExternal pwauth |
24 |
require user admin |
25 |
Satisfy all |
26 |
- AddType application/x-httpd-php .php .php3 |
27 |
- php_flag magic_quotes_gpc on |
28 |
- php_flag track_vars on |
29 |
+ <FilesMatch .php\$\> |
30 |
+ SetHandler "proxy:unix:/var/run/php-fpm/php74-phpldapadmin.sock|fcgi://localhost" |
31 |
+ </FilesMatch> |
32 |
+ SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=\$1 |
33 |
+ |
34 |
</Directory> |
35 |
|
36 |
diff -Nur --no-dereference smeserver-phpldapadmin-1.5.0.old/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/15phpldapadmin smeserver-phpldapadmin-1.5.0/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/15phpldapadmin |
37 |
--- smeserver-phpldapadmin-1.5.0.old/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/15phpldapadmin 1969-12-31 19:00:00.000000000 -0500 |
38 |
+++ smeserver-phpldapadmin-1.5.0/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/15phpldapadmin 2021-06-01 12:42:13.346000000 -0400 |
39 |
@@ -0,0 +1,73 @@ |
40 |
+{ |
41 |
+ |
42 |
+if ($PHP_VERSION eq '74'){ |
43 |
+ if (($phpldapadmin{'status'} || 'disabled') eq 'enabled'){ |
44 |
+ my $max_upload_size = ($phpldapadmin{MaxUploadSize} || '100M');# 104857600 bytes |
45 |
+ $max_upload_size .= 'M' if ($max_upload_size =~ m/^\d+$/); |
46 |
+ my $memory_limit = ($phpldapadmin{MemoryLimit} || '512M'); |
47 |
+ $memory_limit .= 'M' if ($memory_limit =~ m/^\d+$/); |
48 |
+ my $open_basedir= $phpldapadmin{PHPBaseDir} || ''; |
49 |
+ $open_basedir = "/etc/phpMyAdmin/:/usr/share/phpldapadmin/:/var/lib/php/phpldapadmin:". |
50 |
+"/var/lib/phpldapadmin/temp:/var/lib/phpldapadmin/save/:/var/lib/phpldapadmin/upload:/var/lib/phpldapadmin/cache/:". |
51 |
+"/usr/share/php/:". |
52 |
+"/var/log/php/phpldapadmin::/dev/urandom:$open_basedir"; |
53 |
+ my $max_children = $phpldapadmin{'PHPmaxChildren'} || 20; |
54 |
+ my $min_spare_servers = $phpldapadmin{'PHPminServers'} || 4; |
55 |
+ my $start_servers = $phpldapadmin{'PHPstartServers'} || 6; |
56 |
+ my $max_spare_servers = $phpldapadmin{'PHPmaxServers'} || 8; |
57 |
+ my $max_requests = $phpldapadmin{'PHPmaxRequests'} || 1000; |
58 |
+ $min_spare_servers = ( $min_spare_servers > $max_spare_servers ) ? printf("%.0f",$max_spare_servers/2) : $min_spare_servers; |
59 |
+ $start_servers = ( $start_servers > $max_spare_servers ) ? printf("%.0f", $max_spare_servers /2 + $min_spare_servers/2 ) : $start_servers; |
60 |
+ my $id = 'phpldapadmin'; # Note the package is phpMyAdmin |
61 |
+ $OUT .=<<"_EOF"; |
62 |
+ |
63 |
+[php$PHP_VERSION-$id] |
64 |
+user = www |
65 |
+group = www |
66 |
+listen.owner = root |
67 |
+listen.group = www |
68 |
+listen.mode = 0660 |
69 |
+listen = /var/run/php-fpm/php$PHP_VERSION-$id.sock |
70 |
+pm = dynamic |
71 |
+pm.max_children = $max_children |
72 |
+pm.start_servers = $start_servers |
73 |
+pm.min_spare_servers = $min_spare_servers |
74 |
+pm.max_spare_servers = $max_spare_servers |
75 |
+pm.max_requests = $max_requests |
76 |
+; Used in nextcloud |
77 |
+php_admin_value[session.save_path] = /var/lib/php/$id/session |
78 |
+php_admin_value[session.gc_maxlifetime] = 86400 |
79 |
+php_admin_value[opcache.file_cache] = /var/lib/php/$id/opcache |
80 |
+php_admin_value[upload_tmp_dir] = /var/lib/php/$id/tmp |
81 |
+php_admin_value[sys_temp_dir] = /var/lib/php/$id/tmp |
82 |
+php_admin_value[error_log] = /var/log/php/$id/error.log |
83 |
+slowlog = /var/log/php/$id/slow.log |
84 |
+php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f php@{ $DomainName } |
85 |
+php_admin_flag[display_errors] = off |
86 |
+php_admin_flag[log_errors] = on |
87 |
+php_admin_value[memory_limit] = $memory_limit |
88 |
+php_admin_value[max_execution_time] = 3600 |
89 |
+php_admin_value[post_max_size] = $max_upload_size |
90 |
+php_admin_value[upload_max_filesize] = $max_upload_size |
91 |
+php_admin_value[disable_functions] = system, show_source, symlink, exec, dl, shell_exec, passthru, phpinfo, escapeshellarg, escapeshellcmd |
92 |
+php_admin_value[open_basedir] = $open_basedir |
93 |
+php_admin_flag[allow_url_fopen] = on |
94 |
+php_admin_flag[file_upload] = on |
95 |
+php_admin_flag[session.cookie_httponly] = on |
96 |
+php_admin_flag[allow_url_include] = off |
97 |
+php_admin_value[session.save_handler] = files |
98 |
+php_admin_flag[output_buffering] = off |
99 |
+php_admin_value[auto_prepend_file] = /usr/share/php/auth_translation.php |
100 |
+php_flag[session.use_trans_sid] = off |
101 |
+php_flag[track_vars] = on |
102 |
+php_flag[magic_quotes_gpc] = off |
103 |
+ |
104 |
+_EOF |
105 |
+ |
106 |
+ } |
107 |
+ else{ |
108 |
+ $OUT .= '; phpldapadmin is disabled'; |
109 |
+ } |
110 |
+} |
111 |
+} |
112 |
+ |