HSAdmin Backend Domains, E-Mail, Datenbanken
Michael Hierweck
2012-09-20 968560db41934a4c27f66c5130598fe89760336b
hsarback/src/de/hsadmin/mods/dom/httpd-vhost-dynamic.jtpl
@@ -1,11 +1,13 @@
NameVirtualHost {DOM_IPNUMBER}:80
NameVirtualHost {DOM_IPNUMBEREX}:80
<!-- BEGIN: main -->#
# This file is managed by HSAdmin.
# Do not edit manually. Changes will be overwritten.
#
<VirtualHost {DOM_IPNUMBER}:80 {DOM_IPNUMBEREX}:80>
    ServerName {DOM_HOSTNAME}
    ServerAlias *.{DOM_HOSTNAME}
    ServerAdmin {DOM_USERNAME}@{HIVE}.hostsharing.net
    ServerAdmin webmaster@{DOM_HOSTNAME}
    SuexecUserGroup {DOM_USERNAME} {PAC}
@@ -22,34 +24,37 @@
       AllowOverride AuthConfig FileInfo Indexes Limit
    </Directory>
    <Location /cgi-bin/>
    <Directory /home/doms/{DOM_HOSTNAME}/cgi-bin/>
        SetHandler cgi-script
        Options +ExecCGI -Indexes -MultiViews
    </Location>
    </Directory>
    <Location /fastcgi-bin/>
    <Directory /home/doms/{DOM_HOSTNAME}/fastcgi-bin/>
        SetHandler fcgid-script
        Options +ExecCGI -Indexes -MultiViews
    </Location>
    </Directory>
    RewriteEngine On
    RewriteOptions Inherit
    #RewriteLog /home/doms/{DOM_HOSTNAME}/var/rewrite.log
    #RewriteLogLevel 9
    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]
<!-- 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]
<!-- END: iterate -->
    AddType application/x-httpd-php .php .php5 .php4 .php3
    Action application/x-httpd-php /fastcgi-bin/phpstub
</VirtualHost>
NameVirtualHost {DOM_IPNUMBER}:443
NameVirtualHost {DOM_IPNUMBEREX}:443
<VirtualHost {DOM_IPNUMBER}:443 {DOM_IPNUMBEREX}:443>
@@ -62,6 +67,8 @@
    SSLEngine On
    SSLCertificateFile /etc/apache2/pems/default.pem
    SSLCertificateChainFile /etc/apache2/pems/default.chain.pem
    SSLCertificateFile /etc/apache2/pems/{PAC}.pem
    SSLCertificateChainFile /etc/apache2/pems/{PAC}.chain.pem
    DocumentRoot /home/doms/{DOM_HOSTNAME}/htdocs-ssl
@@ -89,17 +96,23 @@
    
    RewriteEngine On
    RewriteOptions Inherit
    #RewriteLog /home/doms/{DOM_HOSTNAME}/var/rewrite.log
    #RewriteLogLevel 9
    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 ^(.*) /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 -->
    AddType application/x-httpd-php .php .php5 .php4 .php3
    Action application/x-httpd-php /fastcgi-bin/phpstub
</VirtualHost>
<!-- END: main -->