From 9d22db16239cd6818b4adb008edf7eef54543a93 Mon Sep 17 00:00:00 2001
From: Peter Hormanns <peter.hormanns@jalin.de>
Date: Fri, 10 May 2013 11:24:12 +0200
Subject: [PATCH] fix dynamic web issue on vhost template

---
 hsarback/src/de/hsadmin/mods/dom/httpd-vhost.vm              |   12 ++++++------
 hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java |    2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java b/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java
index 9639c22..2e43031 100644
--- a/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java
+++ b/hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java
@@ -271,7 +271,7 @@
 
 	private Processor createApacheVHostSetupProcessor(EntityManager em, Domain dom)  throws ProcessorException {
 		Map<String, Object> templateVars = new HashMap<String, Object>();
-		templateVars.put("dom", dom);
+		templateVars.put("dynamicWeb", new Boolean(dom.isDynamic()));
 		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 70052df..3d8c1a0 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( ${dynamicWeb} )
     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
     </Directory>
 
-#if( ${dom.isDynamic} )
+#if( ${dynamicWeb} )
     <Location /cgi-bin/>
         SetHandler cgi-script
         Options +ExecCGI ${includes} -Indexes -MultiViews +SymLinksIfOwnerMatch
@@ -63,7 +63,7 @@
     RewriteRule ^(.*) - [redirect=404,last]
 #end
 
-#if( ${dom.isDynamic} )
+#if( ${dynamicWeb} )
     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( ${dom.isDynamic} )
+#if( ${dynamicWeb} )
     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
     </Directory>
 
-#if( ${dom.isDynamic} )
+#if( ${dynamicWeb} )
     <Location /cgi-bin/>
         SetHandler cgi-script
         Options +ExecCGI ${includes} -Indexes -MultiViews +SymLinksIfOwnerMatch
@@ -137,7 +137,7 @@
     RewriteRule ^(.*) - [redirect=404,last]
 #end
 
-#if( ${dom.isDynamic} )
+#if( ${dynamicWeb} )
     AddType application/x-httpd-php .php .php5 .php4 .php3
     Action application/x-httpd-php /fastcgi-bin/phpstub
 #end

--
Gitblit v1.9.1