1 |
unnilennium |
1.1 |
diff -up smeserver-user-webspace-0.1/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess50userdir.patch7 smeserver-user-webspace-0.1/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess50userdir |
2 |
|
|
--- smeserver-user-webspace-0.1/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess50userdir.patch7 2013-11-26 15:47:00.000000000 -0500 |
3 |
|
|
+++ smeserver-user-webspace-0.1/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/90e-smithAccess50userdir 2013-11-26 16:27:23.000000000 -0500 |
4 |
|
|
@@ -1,3 +1,7 @@ |
5 |
|
|
+#------------------------------------------------------------ |
6 |
|
|
+# User Public html directories |
7 |
|
|
+#------------------------------------------------------------ |
8 |
|
|
+ |
9 |
|
|
{ |
10 |
|
|
my %conf; |
11 |
|
|
tie %conf, 'esmith::config'; |
12 |
|
|
@@ -10,8 +14,8 @@ |
13 |
|
|
my $result = ""; |
14 |
|
|
|
15 |
|
|
my $status = $UserPublicWeb{'status'} || "disabled"; |
16 |
|
|
- return " # user-webspace is disabled in this VirtualHost" |
17 |
|
|
- unless $status eq 'enabled'; |
18 |
|
|
+# return " # user-webspace is disabled in this VirtualHost" |
19 |
|
|
+# unless $status eq 'enabled'; |
20 |
|
|
|
21 |
|
|
my $phpglobal = $UserPublicWeb{'php'} || "disabled"; |
22 |
|
|
|
23 |
|
|
@@ -64,7 +68,7 @@ |
24 |
|
|
# Turned on/off globally through the var UserPublicWeb |
25 |
|
|
# eg. to turn on run /sbin/e-smith/config set UserPublicWeb on |
26 |
|
|
# to turn off run /sbin/e-smith/config set UserPublicWeb off |
27 |
|
|
- if(defined($conf{'UserPublicWeb'}) && ($conf{'UserPublicWeb'} eq "on")) |
28 |
|
|
+ if( $status eq "enabled") |
29 |
|
|
{ |
30 |
|
|
$result .= "#-------------------------------------------------------\n"; |
31 |
|
|
$result .= "# Alias to enable /user aswell as /~user access\n"; |
32 |
|
|
@@ -72,7 +76,9 @@ |
33 |
|
|
while (($key,$value) = each %accounts) |
34 |
|
|
{ |
35 |
|
|
my ($type, %properties) = split (/\|/, $value, -1); |
36 |
|
|
- if ($type eq 'user') |
37 |
|
|
+ my $phpexec = $properties{'php'} || $phpglobal; |
38 |
|
|
+ my $webspace = $properties{'webspace'} || $status; |
39 |
|
|
+ if ($type eq 'user' && $webspace eq "enabled" ) |
40 |
|
|
{ |
41 |
|
|
$result .= "Alias /$key /home/e-smith/files/users/$key/home/public_html\n"; |
42 |
|
|
$result .= "\n"; |
43 |
|
|
@@ -82,15 +88,19 @@ |
44 |
|
|
$result .= "<Directory /home/e-smith/files/users/$key/home/public_html>\n"; |
45 |
|
|
$result .= " AllowOverride FileInfo AuthConfig Limit\n"; |
46 |
|
|
$result .= " Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec\n"; |
47 |
|
|
- |
48 |
|
|
- my $phpexec = $properties{'php'} || $phpglobal; |
49 |
|
|
$result .= " AddType application/x-httpd-php .php .php3 .phtml\n" if $phpexec eq "enabled"; |
50 |
|
|
$result .= " AddType application/x-httpd-php-source .phps\n" if $phpexec eq "enabled"; |
51 |
|
|
- $result .= " php_admin_value open_basedir /home/e-smith/files/users/$key/home/public_html/:/home/e-smith/files/users/$key/tmp/:/usr/share/pear\n"; |
52 |
|
|
- $result .= " php_admin_value upload_tmp_dir /home/e-smith/files/users/$key/tmp/ \n"; |
53 |
|
|
+ $result .= " php_admin_value open_basedir /home/e-smith/files/users/$key/home/public_html/:/home/e-smith/files/users/$key/tmp/:/usr/share/pear\n" if $phpexec eq "enabled"; |
54 |
|
|
+ $result .= " php_admin_value upload_tmp_dir /home/e-smith/files/users/$key/tmp/ \n" if $phpexec eq "enabled"; |
55 |
|
|
$result .= "</Directory>\n"; |
56 |
|
|
|
57 |
|
|
} |
58 |
|
|
+ elsif ( $type eq 'user' && $webspace eq "disabled") |
59 |
|
|
+ |
60 |
|
|
+ { |
61 |
|
|
+ $result .= "# user $key webspace disabled"; |
62 |
|
|
+ } |
63 |
|
|
+ |
64 |
|
|
} |
65 |
|
|
|
66 |
|
|
|
67 |
|
|
@@ -122,6 +132,12 @@ |
68 |
|
|
$result .= " </Limit>\n"; |
69 |
|
|
$result .= "</Directory>\n"; |
70 |
|
|
} |
71 |
|
|
+ else |
72 |
|
|
+ { |
73 |
|
|
+ $result .= "# all user webspaces disabled"; |
74 |
|
|
+ } |
75 |
|
|
+ |
76 |
|
|
+ |
77 |
|
|
} |
78 |
|
|
$result; |
79 |
|
|
} |