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 12:46:57.049000000 -0400 |
22 |
@@ -21,8 +21,11 @@ |
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 |
+ </Directory> |
34 |
+ |
35 |
</Directory> |
36 |
|
37 |
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 |
38 |
--- 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 |
39 |
+++ 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 |
40 |
@@ -0,0 +1,73 @@ |
41 |
+{ |
42 |
+ |
43 |
+if ($PHP_VERSION eq '74'){ |
44 |
+ if (($phpldapadmin{'status'} || 'disabled') eq 'enabled'){ |
45 |
+ my $max_upload_size = ($phpldapadmin{MaxUploadSize} || '100M');# 104857600 bytes |
46 |
+ $max_upload_size .= 'M' if ($max_upload_size =~ m/^\d+$/); |
47 |
+ my $memory_limit = ($phpldapadmin{MemoryLimit} || '512M'); |
48 |
+ $memory_limit .= 'M' if ($memory_limit =~ m/^\d+$/); |
49 |
+ my $open_basedir= $phpldapadmin{PHPBaseDir} || ''; |
50 |
+ $open_basedir = "/etc/phpMyAdmin/:/usr/share/phpldapadmin/:/var/lib/php/phpldapadmin:". |
51 |
+"/var/lib/phpldapadmin/temp:/var/lib/phpldapadmin/save/:/var/lib/phpldapadmin/upload:/var/lib/phpldapadmin/cache/:". |
52 |
+"/usr/share/php/:". |
53 |
+"/var/log/php/phpldapadmin::/dev/urandom:$open_basedir"; |
54 |
+ my $max_children = $phpldapadmin{'PHPmaxChildren'} || 20; |
55 |
+ my $min_spare_servers = $phpldapadmin{'PHPminServers'} || 4; |
56 |
+ my $start_servers = $phpldapadmin{'PHPstartServers'} || 6; |
57 |
+ my $max_spare_servers = $phpldapadmin{'PHPmaxServers'} || 8; |
58 |
+ my $max_requests = $phpldapadmin{'PHPmaxRequests'} || 1000; |
59 |
+ $min_spare_servers = ( $min_spare_servers > $max_spare_servers ) ? printf("%.0f",$max_spare_servers/2) : $min_spare_servers; |
60 |
+ $start_servers = ( $start_servers > $max_spare_servers ) ? printf("%.0f", $max_spare_servers /2 + $min_spare_servers/2 ) : $start_servers; |
61 |
+ my $id = 'phpldapadmin'; # Note the package is phpMyAdmin |
62 |
+ $OUT .=<<"_EOF"; |
63 |
+ |
64 |
+[php$PHP_VERSION-$id] |
65 |
+user = www |
66 |
+group = www |
67 |
+listen.owner = root |
68 |
+listen.group = www |
69 |
+listen.mode = 0660 |
70 |
+listen = /var/run/php-fpm/php$PHP_VERSION-$id.sock |
71 |
+pm = dynamic |
72 |
+pm.max_children = $max_children |
73 |
+pm.start_servers = $start_servers |
74 |
+pm.min_spare_servers = $min_spare_servers |
75 |
+pm.max_spare_servers = $max_spare_servers |
76 |
+pm.max_requests = $max_requests |
77 |
+; Used in nextcloud |
78 |
+php_admin_value[session.save_path] = /var/lib/php/$id/session |
79 |
+php_admin_value[session.gc_maxlifetime] = 86400 |
80 |
+php_admin_value[opcache.file_cache] = /var/lib/php/$id/opcache |
81 |
+php_admin_value[upload_tmp_dir] = /var/lib/php/$id/tmp |
82 |
+php_admin_value[sys_temp_dir] = /var/lib/php/$id/tmp |
83 |
+php_admin_value[error_log] = /var/log/php/$id/error.log |
84 |
+slowlog = /var/log/php/$id/slow.log |
85 |
+php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f php@{ $DomainName } |
86 |
+php_admin_flag[display_errors] = off |
87 |
+php_admin_flag[log_errors] = on |
88 |
+php_admin_value[memory_limit] = $memory_limit |
89 |
+php_admin_value[max_execution_time] = 3600 |
90 |
+php_admin_value[post_max_size] = $max_upload_size |
91 |
+php_admin_value[upload_max_filesize] = $max_upload_size |
92 |
+php_admin_value[disable_functions] = system, show_source, symlink, exec, dl, shell_exec, passthru, phpinfo, escapeshellarg, escapeshellcmd |
93 |
+php_admin_value[open_basedir] = $open_basedir |
94 |
+php_admin_flag[allow_url_fopen] = on |
95 |
+php_admin_flag[file_upload] = on |
96 |
+php_admin_flag[session.cookie_httponly] = on |
97 |
+php_admin_flag[allow_url_include] = off |
98 |
+php_admin_value[session.save_handler] = files |
99 |
+php_admin_flag[output_buffering] = off |
100 |
+php_admin_value[auto_prepend_file] = /usr/share/php/auth_translation.php |
101 |
+php_flag[session.use_trans_sid] = off |
102 |
+php_flag[track_vars] = on |
103 |
+php_flag[magic_quotes_gpc] = off |
104 |
+ |
105 |
+_EOF |
106 |
+ |
107 |
+ } |
108 |
+ else{ |
109 |
+ $OUT .= '; phpldapadmin is disabled'; |
110 |
+ } |
111 |
+} |
112 |
+} |
113 |
+ |