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 --- 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 +++ 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 @@ -1,3 +1,7 @@ +#------------------------------------------------------------ +# User Public html directories +#------------------------------------------------------------ + { my %conf; tie %conf, 'esmith::config'; @@ -10,8 +14,8 @@ my $result = ""; my $status = $UserPublicWeb{'status'} || "disabled"; - return " # user-webspace is disabled in this VirtualHost" - unless $status eq 'enabled'; +# return " # user-webspace is disabled in this VirtualHost" +# unless $status eq 'enabled'; my $phpglobal = $UserPublicWeb{'php'} || "disabled"; @@ -64,7 +68,7 @@ # Turned on/off globally through the var UserPublicWeb # eg. to turn on run /sbin/e-smith/config set UserPublicWeb on # to turn off run /sbin/e-smith/config set UserPublicWeb off - if(defined($conf{'UserPublicWeb'}) && ($conf{'UserPublicWeb'} eq "on")) + if( $status eq "enabled") { $result .= "#-------------------------------------------------------\n"; $result .= "# Alias to enable /user aswell as /~user access\n"; @@ -72,7 +76,9 @@ while (($key,$value) = each %accounts) { my ($type, %properties) = split (/\|/, $value, -1); - if ($type eq 'user') + my $phpexec = $properties{'php'} || $phpglobal; + my $webspace = $properties{'webspace'} || $status; + if ($type eq 'user' && $webspace eq "enabled" ) { $result .= "Alias /$key /home/e-smith/files/users/$key/home/public_html\n"; $result .= "\n"; @@ -82,15 +88,19 @@ $result .= "\n"; $result .= " AllowOverride FileInfo AuthConfig Limit\n"; $result .= " Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec\n"; - - my $phpexec = $properties{'php'} || $phpglobal; $result .= " AddType application/x-httpd-php .php .php3 .phtml\n" if $phpexec eq "enabled"; $result .= " AddType application/x-httpd-php-source .phps\n" if $phpexec eq "enabled"; - $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"; - $result .= " php_admin_value upload_tmp_dir /home/e-smith/files/users/$key/tmp/ \n"; + $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"; + $result .= " php_admin_value upload_tmp_dir /home/e-smith/files/users/$key/tmp/ \n" if $phpexec eq "enabled"; $result .= "\n"; } + elsif ( $type eq 'user' && $webspace eq "disabled") + + { + $result .= "# user $key webspace disabled"; + } + } @@ -122,6 +132,12 @@ $result .= " \n"; $result .= "\n"; } + else + { + $result .= "# all user webspaces disabled"; + } + + } $result; }