#
# This file is managed by HSAdmin.
# Do not edit manually. Changes will be overwritten.
#

<VirtualHost 83.223.94.198:80 83.223.94.198:80 [2a01:37:3000:0:0:53df:5ec6:0]:80 [2a01:37:3000:0:0:53df:5ec6:0]:80>
    ServerName chg96.hs-example.de
    ServerAlias  *.chg96.hs-example.de
    ServerAdmin webmaster@chg96.hs-example.de

    SuexecUserGroup chg96 chg96

    PassengerEnabled Off
    PassengerUser chg96
    PassengerGroup chg96
    PassengerAppRoot /home/doms/chg96.hs-example.de/app/

    DocumentRoot /home/doms/chg96.hs-example.de/htdocs

    Alias /fastcgi-bin/ /home/doms/chg96.hs-example.de/fastcgi/

    <Directory />
        PassengerEnabled Off
        Options -ExecCGI -Includes +Indexes -MultiViews +SymLinksIfOwnerMatch
    </Directory>

    <Directory /home/doms/chg96.hs-example.de/>
        PassengerEnabled Off
        PassengerPython /usr/bin/python3
        PassengerNodejs /usr/bin/node
        PassengerRuby /usr/bin/ruby
        AllowOverride AuthConfig FileInfo Indexes Limit Options=ExecCGI,Includes,Indexes,MultiViews,SymLinksIfOwnerMatch
    </Directory>


    <Location /fastcgi-bin/>
        PassengerEnabled Off
        SetHandler fcgid-script
        Options +ExecCGI +Includes -Indexes -MultiViews +SymLinksIfOwnerMatch
    </Location>

    <Location /autodiscover/autodiscover.xml>
        ProxyPreserveHost Off
        ProxyPass http://127.0.0.1:8082/
    </Location>

    <Location /.well-known/autoconfig/mail/config-v1.1.xml>
        ProxyPreserveHost Off
        ProxyPass http://127.0.0.1:8081/
    </Location>

    RewriteEngine On
    RewriteOptions Inherit

    RewriteCond %{REQUEST_URI} !^/fastcgi-bin/
    RewriteCond %{HTTP_HOST} ^(.+)\.chg96.hs-example.de\.?(:[0-9]+)?$ [novary]
    RewriteCond /home/doms/chg96.hs-example.de/subs/${tolower:%1}  -d
    RewriteRule ^(.*) /home/doms/chg96.hs-example.de/subs/${tolower:%1}$1  [last]

    FcgidInitialEnv HTTP_PHP_BIN /usr/lib/cgi-bin/php
    SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
    AddType application/x-httpd-php .php 
    Action application/x-httpd-php /fastcgi-bin/hs-phpstub
</VirtualHost>

<VirtualHost 83.223.94.198:443 83.223.94.198:443 [2a01:37:3000:0:0:53df:5ec6:0]:443 [2a01:37:3000:0:0:53df:5ec6:0]:443>
    ServerName chg96.hs-example.de
    ServerAlias  *.chg96.hs-example.de
    ServerAdmin webmaster@chg96.hs-example.de

    SuexecUserGroup chg96 chg96

    PassengerEnabled Off
    PassengerUser chg96
    PassengerGroup chg96
    PassengerAppRoot /home/doms/chg96.hs-example.de/app-ssl/

    SSLEngine On
    SSLCertificateFile /etc/apache2/pems-enabled/chg96.hs-example.de.crt
    SSLCertificateKeyFile /etc/apache2/pems-enabled/chg96.hs-example.de.key
    SSLCertificateChainFile /etc/apache2/pems-enabled/chg96.hs-example.de.chain

    DocumentRoot /home/doms/chg96.hs-example.de/htdocs-ssl

    Alias /fastcgi-bin/ /home/doms/chg96.hs-example.de/fastcgi-ssl/

    <Directory />
        SSLRequireSSL On
        PassengerEnabled Off
        Options -ExecCGI -Includes +Indexes -MultiViews +SymLinksIfOwnerMatch
    </Directory>

    <Directory /home/doms/chg96.hs-example.de/>
        PassengerEnabled Off
        PassengerPython /usr/bin/python3
        PassengerNodejs /usr/bin/node
        PassengerRuby /usr/bin/ruby
        AllowOverride AuthConfig FileInfo Indexes Limit Options=ExecCGI,Includes,Indexes,MultiViews,SymLinksIfOwnerMatch
    </Directory>


    <Location /fastcgi-bin/>
        PassengerEnabled Off
        SetHandler fcgid-script
        Options +ExecCGI +Includes -Indexes -MultiViews +SymLinksIfOwnerMatch
    </Location>

    <Location /autodiscover/autodiscover.xml>
        ProxyPreserveHost Off
        ProxyPass http://127.0.0.1:8082/
    </Location>

    <Location /.well-known/autoconfig/mail/config-v1.1.xml>
        ProxyPreserveHost Off
        ProxyPass http://127.0.0.1:8081/
    </Location>

    RewriteEngine On
    RewriteOptions Inherit

    RewriteCond %{REQUEST_URI} !^/fastcgi-bin/
    RewriteCond %{HTTP_HOST} ^(.+)\.chg96.hs-example.de\.?(:[0-9]+)?$ [novary]
    RewriteCond /home/doms/chg96.hs-example.de/subs-ssl/${tolower:%1}  -d
    RewriteRule ^(.*) /home/doms/chg96.hs-example.de/subs-ssl/${tolower:%1}$1  [last]

    FcgidInitialEnv HTTP_PHP_BIN /usr/lib/cgi-bin/php
    SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
    AddType application/x-httpd-php .php
    Action application/x-httpd-php /fastcgi-bin/hs-phpstub
</VirtualHost>
