From d63deeceaecee451a9feaf1686b83e37c794968e Mon Sep 17 00:00:00 2001 From: Peter Hormanns Date: Thu, 9 May 2013 16:51:34 +0200 Subject: [PATCH] fix error on dynmic web domain vhosts --- .../de/hsadmin/mods/dom/DomainProcessorFactory.java | 1 + hsarback/src/de/hsadmin/mods/dom/httpd-vhost.vm | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java b/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java index 01d2f21..9639c22 100644 --- a/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java +++ b/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java @@ -271,6 +271,7 @@ public class DomainProcessorFactory implements EntityProcessorFactory { private Processor createApacheVHostSetupProcessor(EntityManager em, Domain dom) throws ProcessorException { Map templateVars = new HashMap(); + templateVars.put("dom", dom); String domName = dom.getName(); int level = domName.split("\\.").length; String linkPrefix = Integer.toString(100 - level); diff --git a/hsarback/src/de/hsadmin/mods/dom/httpd-vhost.vm b/hsarback/src/de/hsadmin/mods/dom/httpd-vhost.vm index 9474e6d..133f2a2 100644 --- a/hsarback/src/de/hsadmin/mods/dom/httpd-vhost.vm +++ b/hsarback/src/de/hsadmin/mods/dom/httpd-vhost.vm @@ -13,7 +13,7 @@ DocumentRoot /home/doms/${dom.name}/htdocs -#if( ${dom.isDynamic} ) +#if( ${dom.dynamic} ) Alias /cgi-bin/ /home/doms/${dom.name}/cgi/ Alias /fastcgi-bin/ /home/doms/${dom.name}/fastcgi/ #end @@ -26,7 +26,7 @@ AllowOverride AuthConfig FileInfo Indexes Limit -#if( ${dom.isDynamic} ) +#if( ${dom.dynamic} ) SetHandler cgi-script Options +ExecCGI ${includes} -Indexes -MultiViews +SymLinksIfOwnerMatch @@ -63,7 +63,7 @@ RewriteRule ^(.*) - [redirect=404,last] #end -#if( ${dom.isDynamic} ) +#if( ${dom.dynamic} ) AddType application/x-httpd-php .php .php5 .php4 .php3 Action application/x-httpd-php /fastcgi-bin/phpstub #end @@ -86,7 +86,7 @@ DocumentRoot /home/doms/${dom.name}/htdocs-ssl -#if( ${pac.dynamicWeb} || ${dom.pacDomain} ) +#if( ${dom.dynamic} ) Alias /cgi-bin/ /home/doms/${dom.name}/cgi-ssl/ Alias /fastcgi-bin/ /home/doms/${dom.name}/fastcgi-ssl/ #end @@ -100,7 +100,7 @@ AllowOverride AuthConfig FileInfo Indexes Limit -#if( ${pac.dynamicWeb} || ${dom.pacDomain} ) +#if( ${dom.dynamic} ) SetHandler cgi-script Options +ExecCGI ${includes} -Indexes -MultiViews +SymLinksIfOwnerMatch @@ -137,7 +137,7 @@ RewriteRule ^(.*) - [redirect=404,last] #end -#if( ${pac.dynamicWeb} || ${dom.pacDomain} ) +#if( ${dom.dynamic} ) AddType application/x-httpd-php .php .php5 .php4 .php3 Action application/x-httpd-php /fastcgi-bin/phpstub #end