From cadd25346c0808e7cfa81c6667bd058fdc358532 Mon Sep 17 00:00:00 2001
From: Purodha Blissenbach <purodha.blissenbach@hostsharing.net>
Date: Fri, 21 Sep 2012 13:51:14 +0200
Subject: [PATCH] Merge branch 'master' of ssh://hsh04-source@hsh04.hostsharing.net/home/doms/source.hostsharing.net/source/hsadmin.git

---
 hsarback/src/de/hsadmin/mods/dom/httpd-vhost-static.jtpl |   42 ++++++++++++++++++++----------------------
 1 files changed, 20 insertions(+), 22 deletions(-)

diff --git a/hsarback/src/de/hsadmin/mods/dom/httpd-vhost-static.jtpl b/hsarback/src/de/hsadmin/mods/dom/httpd-vhost-static.jtpl
index 4a2cb1c..058b4aa 100644
--- a/hsarback/src/de/hsadmin/mods/dom/httpd-vhost-static.jtpl
+++ b/hsarback/src/de/hsadmin/mods/dom/httpd-vhost-static.jtpl
@@ -14,33 +14,32 @@
     DocumentRoot /home/doms/{DOM_HOSTNAME}/htdocs
 
     <Directory />
-        Options -ExecCGI +IncludesNOEXEC +Indexes +MultiViews +SymLinksIfOwnerMatch
+        Options -ExecCGI {INCLUDES} {INDEXES} {MULTIVIEWS} +SymLinksIfOwnerMatch
     </Directory>
 
     <Directory /home/doms/{DOM_HOSTNAME}/>
-       AllowOverride AuthConfig FileInfo Indexes Limit
+        AllowOverride AuthConfig FileInfo Indexes Limit
     </Directory>
 
-    <Directory /home/doms/{DOM_HOSTNAME}/cgi-bin/>
+    <Location /cgi-bin/>
         Redirect 501 /
-    </Directory>
+    </Location>
 
-    <Directory /home/doms/{DOM_HOSTNAME}/fastcgi-bin/>
+    <Location /fastcgi-bin/>
         Redirect 501 /
-    </Directory>
+    </Location>
 
     RewriteEngine On
     RewriteOptions Inherit
     
-    RewriteCond %{HTTP_HOST} ^(.+)\.{DOM_HOSTNAME}\.?(:80)?$ [novary]
-    RewriteCond /home/doms/{DOM_HOSTNAME}/subs/${tolower:%1} -d
-    RewriteRule ^(.*) /home/doms/{DOM_HOSTNAME}/subs/${tolower:%1}$1 [last]
+    RewriteCond %{REQUEST_URI} !^/cgi-bin/
+    RewriteCond %{REQUEST_URI} !^/fastcgi-bin/    
+    RewriteCond %{HTTP_HOST} ^(.+)\.{DOM_HOSTNAME}\.?(:[0-9]+)?$ [novary]
+    RewriteCond /home/doms/{DOM_HOSTNAME}/subs-ssl/${tolower:%1} -d
+    RewriteRule ^(.*) /home/doms/{DOM_HOSTNAME}/subs-ssl/${tolower:%1}$1 [last]
     
-<!-- BEGIN: iterate -->    RewriteCond %{HTTP_HOST} ^(.+)\.{DOM_HOSTNAME}\.?(:80)?$ [novary]
-    RewriteCond /home/doms/{DOM_HOSTNAME}/subs/${tolower:%1} !-d
-    RewriteRule ^(.*) - [redirect=404,last]
-    
-<!-- END: iterate -->
+    {HTDOCSFALLBACKHTTP}
+
 </VirtualHost>
 
 <VirtualHost {DOM_IPNUMBER}:443 {DOM_IPNUMBEREX}:443>
@@ -61,7 +60,7 @@
 
     <Directory />
         SSLRequireSSL On
-        Options -ExecCGI +IncludesNOEXEC +Indexes +MultiViews +SymLinksIfOwnerMatch
+        Options -ExecCGI {INCLUDES} {INDEXES} {MULTIVIEWS} +SymLinksIfOwnerMatch
     </Directory>
 
     <Directory /home/doms/{DOM_HOSTNAME}/>
@@ -74,19 +73,18 @@
 
     <Location /fastcgi-bin/>
         Redirect 501 /
-    </Location>
+    </Location>    
     
     RewriteEngine On
     RewriteOptions Inherit
     
-    RewriteCond %{HTTP_HOST} ^(.+)\.{DOM_HOSTNAME}\.?(:443)?$ [novary]
+    RewriteCond %{REQUEST_URI} !^/cgi-bin/
+    RewriteCond %{REQUEST_URI} !^/fastcgi-bin/    
+    RewriteCond %{HTTP_HOST} ^(.+)\.{DOM_HOSTNAME}\.?(:[0-9]+)?$ [novary]
     RewriteCond /home/doms/{DOM_HOSTNAME}/subs-ssl/${tolower:%1} -d
     RewriteRule ^(.*) /home/doms/{DOM_HOSTNAME}/subs-ssl/${tolower:%1}$1 [last]
-
-<!-- BEGIN: nosubdomainfallbackforhttps -->    RewriteCond %{HTTP_HOST} ^(.+)\.{DOM_HOSTNAME}\.?(:443)?$ [novary]
-    RewriteCond /home/doms/{DOM_HOSTNAME}/subs-ssl/${tolower:%1} !-d
-    RewriteRule ^(.*) - [redirect=404,last]
     
-<!-- END: nosubdomainfallbackforhttps -->
+    {HTDOCSFALLBACKHTTPS}
+
 </VirtualHost>
 <!-- END: main -->
\ No newline at end of file

--
Gitblit v1.9.0-SNAPSHOT