1 |
vip-ire |
1.1 |
diff -Nur smeserver-shared-folders-0.3/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess50shares smeserver-shared-folders-0.3_phpfpm/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess50shares |
2 |
vip-ire |
1.2 |
--- smeserver-shared-folders-0.3/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess50shares 2017-07-13 15:20:20.341603722 +0200 |
3 |
|
|
+++ smeserver-shared-folders-0.3_phpfpm/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess50shares 2017-07-13 15:19:49.045596077 +0200 |
4 |
vip-ire |
1.1 |
@@ -120,20 +120,33 @@ |
5 |
|
|
|
6 |
|
|
if ($dynamicContent eq 'enabled') { |
7 |
|
|
$OUT .= " Options +Includes\n"; |
8 |
|
|
- $OUT .= " AddType application/x-httpd-php .php .php3 .phtml\n"; |
9 |
|
|
- $OUT .= " AddType application/x-httpd-php-source .phps\n"; |
10 |
|
|
+ if ($fastcgi_mod eq 'mod_fastcgi'){ |
11 |
vip-ire |
1.2 |
+ $OUT .= ' AddHandler php' . $key . '-fastcgi .php' . "\n"; |
12 |
vip-ire |
1.1 |
+ } |
13 |
|
|
+ elsif ($fastcgi_mod eq 'mod_proxy_fcgi'){ |
14 |
|
|
+ my $version = $properties{'PHPVersion'} || ''; |
15 |
|
|
+ $OUT .=<<"_EOF"; |
16 |
|
|
+ <FilesMatch \.php\$> |
17 |
|
|
+ SetHandler "proxy:unix:/var/run/php-fpm/php$version-$key.sock|fcgi://localhost" |
18 |
|
|
+ </FilesMatch> |
19 |
|
|
+_EOF |
20 |
|
|
+ } |
21 |
|
|
+ else{ |
22 |
|
|
+ $OUT .= " AddType application/x-httpd-php .php .php3 .phtml\n"; |
23 |
|
|
+ $OUT .= " AddType application/x-httpd-php-source .phps\n"; |
24 |
|
|
|
25 |
|
|
- my $basedir = $properties{PHPBaseDir} |
26 |
|
|
- || ("/home/e-smith/files/shares/$key/"); |
27 |
|
|
- $OUT .= " php_admin_value open_basedir $basedir\n"; |
28 |
|
|
- $OUT .= " php_admin_flag register_globals on\n" |
29 |
|
|
- if (($properties{PHPRegisterGlobals} || 'disabled') eq 'enabled'); |
30 |
|
|
- $OUT .= " php_admin_flag allow_url_fopen on\n" |
31 |
|
|
- if (($properties{PHPAllowUrlFopen} || 'disabled') eq 'enabled'); |
32 |
|
|
- $OUT .= " php_admin_value memory_limit $properties{PHPMemoryLimit}\n" |
33 |
|
|
- if ($properties{PHPMemoryLimit}); |
34 |
|
|
- $OUT .= " php_admin_value max_execution_time $properties{PHPMaxExecutionTime}\n" |
35 |
|
|
- if ($properties{PHPMaxExecutionTime}); |
36 |
|
|
+ my $basedir = $properties{PHPBaseDir} |
37 |
|
|
+ || ("/home/e-smith/files/shares/$key/"); |
38 |
|
|
+ $OUT .= " php_admin_value open_basedir $basedir\n"; |
39 |
|
|
+ $OUT .= " php_admin_flag register_globals on\n" |
40 |
|
|
+ if (($properties{PHPRegisterGlobals} || 'disabled') eq 'enabled'); |
41 |
|
|
+ $OUT .= " php_admin_flag allow_url_fopen on\n" |
42 |
|
|
+ if (($properties{PHPAllowUrlFopen} || 'disabled') eq 'enabled'); |
43 |
|
|
+ $OUT .= " php_admin_value memory_limit $properties{PHPMemoryLimit}\n" |
44 |
|
|
+ if ($properties{PHPMemoryLimit}); |
45 |
|
|
+ $OUT .= " php_admin_value max_execution_time $properties{PHPMaxExecutionTime}\n" |
46 |
|
|
+ if ($properties{PHPMaxExecutionTime}); |
47 |
|
|
+ } |
48 |
|
|
} |
49 |
|
|
else { |
50 |
|
|
$OUT .= " DirectoryIndex index.shtml index.htm index.html\n"; |