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-dynamic.jtpl |   54 +++++++++++++++++++++---------------------------------
 1 files changed, 21 insertions(+), 33 deletions(-)

diff --git a/hsarback/src/de/hsadmin/mods/dom/httpd-vhost-dynamic.jtpl b/hsarback/src/de/hsadmin/mods/dom/httpd-vhost-dynamic.jtpl
index e8d7af6..c572834 100644
--- a/hsarback/src/de/hsadmin/mods/dom/httpd-vhost-dynamic.jtpl
+++ b/hsarback/src/de/hsadmin/mods/dom/httpd-vhost-dynamic.jtpl
@@ -17,40 +17,34 @@
     Alias /fastcgi-bin/ /home/doms/{DOM_HOSTNAME}/fastcgi/
 
     <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/>
         SetHandler cgi-script
-        Options +ExecCGI -Indexes -MultiViews
-    </Directory>
+        Options +ExecCGI {INCLUDES} -Indexes -MultiViews +SymLinksIfOwnerMatch
+    </Location>
 
-    <Directory /home/doms/{DOM_HOSTNAME}/fastcgi-bin/>
+    <Location /fastcgi-bin/>
         SetHandler fcgid-script
-        Options +ExecCGI -Indexes -MultiViews
-    </Directory>
+        Options +ExecCGI {INCLUDES} -Indexes -MultiViews +SymLinksIfOwnerMatch
+    </Location>
 
     RewriteEngine On
     RewriteOptions Inherit
     
     RewriteCond %{REQUEST_URI} !^/cgi-bin/
-    RewriteCond %{REQUEST_URI} !^/fastcgi-bin/
-    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} !^/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 %{REQUEST_URI} !^/cgi-bin/
-    RewriteCond %{REQUEST_URI} !^/fastcgi-bin/
-    RewriteCond %{HTTP_HOST} ^(.+)\.{DOM_HOSTNAME}\.?(:80)?$ [novary]
-    RewriteCond /home/doms/{DOM_HOSTNAME}/subs/${tolower:%1} !-d
-    RewriteRule ^(.*) - [redirect=404,last]
+    {HTDOCSFALLBACKHTTP}
 
-<!-- END: iterate -->
     AddType application/x-httpd-php .php .php5 .php4 .php3
     Action application/x-httpd-php /fastcgi-bin/phpstub
 
@@ -77,7 +71,7 @@
 
     <Directory />
         SSLRequireSSL On
-        Options -ExecCGI +IncludesNOEXEC +Indexes +MultiViews +SymLinksIfOwnerMatch
+        Options -ExecCGI {INCLUDES} {INDEXES} {MULTIVIEWS} +SymLinksIfOwnerMatch
     </Directory>
 
     <Directory /home/doms/{DOM_HOSTNAME}/>
@@ -86,31 +80,25 @@
 
     <Location /cgi-bin/>
         SetHandler cgi-script
-        Options +ExecCGI -Indexes -MultiViews
+        Options +ExecCGI {INCLUDES} -Indexes -MultiViews +SymLinksIfOwnerMatch
     </Location>
 
     <Location /fastcgi-bin/>
         SetHandler fcgid-script
-        Options +ExecCGI -Indexes -MultiViews
+        Options +ExecCGI {INCLUDES} -Indexes -MultiViews +SymLinksIfOwnerMatch
     </Location>
     
     RewriteEngine On
     RewriteOptions Inherit
-
+    
     RewriteCond %{REQUEST_URI} !^/cgi-bin/
-    RewriteCond %{REQUEST_URI} !^/fastcgi-bin/
-    RewriteCond %{HTTP_HOST} ^(.+)\.{DOM_HOSTNAME}\.?(:443)?$ [novary]
+    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 %{REQUEST_URI} !^/cgi-bin/
-    RewriteCond %{REQUEST_URI} !^/fastcgi-bin/
-    RewriteCond %{HTTP_HOST} ^(.+)\.{DOM_HOSTNAME}\.?(:443)?$ [novary]
-    RewriteCond /home/doms/{DOM_HOSTNAME}/subs-ssl/${tolower:%1} !-d
-    RewriteRule ^(.*) - [redirect=404,last]
-    
-<!-- END: nosubdomainfallbackforhttps -->
+    {HTDOCSFALLBACKHTTPS}
+
     AddType application/x-httpd-php .php .php5 .php4 .php3
     Action application/x-httpd-php /fastcgi-bin/phpstub
 

--
Gitblit v1.9.0-SNAPSHOT