Changes

From SME Server
Jump to navigationJump to search
391 bytes removed ,  08:02, 16 December 2012
no edit summary
Line 142: Line 142:  
Contens of the text file:
 
Contens of the text file:
   −
    $OUT .= "    DocumentRoot        $basedir/html\n";
+
 
 
      
 
      
        if ($cgiBin)
  −
        {
  −
    $OUT .= "    ScriptAlias /cgi-bin $basedir/cgi-bin\n";
  −
        }
  −
        else
  −
        {
  −
    $OUT .=
  −
    "    # To add cgi-bin ScriptAlias for this i-bay, run:\n"
  −
          . "    #  /sbin/e-smith/db accounts setprop $ibay CgiBin "
  −
      . "enabled\n"
  −
    . "    #  /sbin/e-smith/signal-event console-save\n";
  −
        }
  −
        $OUT .= "#    Alias      /files  $basedir/files\n";
  −
       
   
         if (($domains->get_prop($virtualHost, 'SystemPrimaryDomain') || 'no')
 
         if (($domains->get_prop($virtualHost, 'SystemPrimaryDomain') || 'no')
 
             eq 'yes')
 
             eq 'yes')
 
         {
 
         {
    my @ibays = $accounts->ibays;
+
    my @ibays = $accounts->ibays;
    foreach my $ibay (@ibays)
+
    foreach my $ibay (@ibays)
{
+
    {
    my $key = $ibay->key;
+
        my $key = $ibay->key;
    next if $key eq $virtualHostContent;
+
        next if $key eq $virtualHostContent;
    my $basedir = "/home/e-smith/files/ibays/$key";
+
        my $basedir = "/home/e-smith/files/ibays/$key";
    my $cgiBin = $ibay->prop("CgiBin") || "";
+
        my $cgiBin = $ibay->prop("CgiBin") || "";
    my $name = $ibay->prop("Name") || "";
+
        my $name = $ibay->prop("Name") || "";
   
+
       
    $OUT .= "\n";
+
        $OUT .= "\n";
    $OUT .= "    # $key ibay ($name)\n";
+
        $OUT .= "    # $key ibay ($name)\n";
    $OUT .= "\n";
+
        $OUT .= "\n";
   
+
       
    if ($cgiBin)
+
        if ($cgiBin)
    {
+
        {
    $OUT .= "    ScriptAlias /$key/cgi-bin $basedir/cgi-bin\n";
+
    $OUT .= "    ScriptAlias /$key/cgi-bin $basedir/cgi-bin\n";
    }
+
        }
    else
+
        else
    {
+
        {
$OUT .=  
+
    $OUT .=  
    "    # To add cgi-bin ScriptAlias for this i-bay, run:\n"
+
        "    # To add cgi-bin ScriptAlias for this i-bay, run:\n"
    . "    #  /sbin/e-smith/db accounts setprop $key CgiBin "
+
        . "    #  /sbin/e-smith/db accounts setprop $key CgiBin "
. "enabled\n"
+
    . "enabled\n"
    . "    #  /sbin/e-smith/signal-event console-save\n";
+
        . "    #  /sbin/e-smith/signal-event console-save\n";
    }
+
        }
 
      
 
      
 
         $OUT .= "    Alias      /$key/files  $basedir/files\n";
 
         $OUT .= "    Alias      /$key/files  $basedir/files\n";
Line 192: Line 178:  
         # aliases. If we put it first, it would get expanded before the
 
         # aliases. If we put it first, it would get expanded before the
 
         # other aliases, creating problems.
 
         # other aliases, creating problems.
   
+
   
        $OUT .= "    Alias      /$key        $basedir/html\n";
+
        $OUT .= "    Alias      /$key        $basedir/html\n";
    }
+
    }
    $OUT .= "    # No ibays in system\n" unless @ibays;
+
    $OUT .= "    # No ibays in system\n" unless @ibays;
 
         }
 
         }
 
     }
 
     }
175

edits

Navigation menu