Changes

From SME Server
Jump to navigationJump to search
990 bytes removed ,  07:35, 14 March 2008
m
→‎Webserver templates: remove domain root option
Line 224: Line 224:  
       $OUT .= "</Directory>\n";
 
       $OUT .= "</Directory>\n";
 
     }
 
     }
}
  −
  −
* a workaround to enable the application to be located in a domain or subdomain root
  −
  −
note this causes side effects, another method is needed
  −
  −
root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/80OptDomainFoo
  −
  −
{
  −
    my $status = $foo{'status'} || "disabled";
  −
    return "    # foo-status is disabled.\n"
  −
            unless $status eq 'enabled';
  −
  −
    my $domain = $foo{'domain'} || "disabled";
  −
    return "    # no hostname or domain for foo defined\n"
  −
            if $domain eq 'disabled';
  −
  −
    my $DocRoot = "/opt/foo";
  −
  −
    $OUT  = "";
  −
    $OUT .= "\n";
  −
    $OUT .= "# Redirect an existing hostname or domain to $DocRoot.\n";
  −
    $OUT .= "<VirtualHost 0.0.0.0:80>\n";
  −
    $OUT .= "    ServerName  $domain\n";
  −
    $OUT .= "    DocumentRoot $DocRoot\n";
  −
    $OUT .= "</VirtualHost>\n";
  −
    $OUT .= "<VirtualHost 0.0.0.0:443>\n";
  −
    $OUT .= "    ServerName  $domain\n";
  −
    $OUT .= "    DocumentRoot  $DocRoot\n";
  −
    $OUT .= "    SSLEngine on\n";
  −
    $OUT .= "</VirtualHost>\n";
   
  }
 
  }
  

Navigation menu