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

<VirtualHost 83.223.94.77:80 83.223.94.77:80 [2a01:37:3000:0:0:53df:5e4d:0]:80 [2a01:37:3000:0:0:53df:5e4d:0]:80>
    ServerName assets.http2.hs-example.de
    ServerAlias  *.assets.http2.hs-example.de
    ServerAdmin webmaster@assets.http2.hs-example.de

    SuexecUserGroup xyz96 xyz96

    PassengerEnabled Off
    PassengerUser xyz96
    PassengerGroup xyz96
    PassengerAppRoot /home/doms/assets.http2.hs-example.de/app/

    DocumentRoot /home/doms/assets.http2.hs-example.de/htdocs

    Alias /fastcgi-bin/ /home/doms/assets.http2.hs-example.de/fastcgi/

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

    <Directory /home/doms/assets.http2.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 +IncludesNoExec -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} ^(.+)\.assets.http2.hs-example.de\.?(:[0-9]+)?$ [novary]
    RewriteCond /home/doms/assets.http2.hs-example.de/subs/${tolower:%1}  -d
    RewriteRule ^(.*) /home/doms/assets.http2.hs-example.de/subs/${tolower:%1}$1  [last]

    FcgidInitialEnv HTTP_PHP_BIN /usr/lib/cgi-bin/php
    AddType application/x-httpd-php .php 
    Action application/x-httpd-php /fastcgi-bin/hs-phpstub
</VirtualHost>

<VirtualHost 83.223.94.77:443 83.223.94.77:443 [2a01:37:3000:0:0:53df:5e4d:0]:443 [2a01:37:3000:0:0:53df:5e4d:0]:443>
    ServerName assets.http2.hs-example.de
    ServerAlias  *.assets.http2.hs-example.de
    ServerAdmin webmaster@assets.http2.hs-example.de

    SuexecUserGroup xyz96 xyz96

    PassengerEnabled Off
    PassengerUser xyz96
    PassengerGroup xyz96
    PassengerAppRoot /home/doms/assets.http2.hs-example.de/app-ssl/

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

    DocumentRoot /home/doms/assets.http2.hs-example.de/htdocs-ssl

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

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

    <Directory /home/doms/assets.http2.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 +IncludesNoExec -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} ^(.+)\.assets.http2.hs-example.de\.?(:[0-9]+)?$ [novary]
    RewriteCond /home/doms/assets.http2.hs-example.de/subs-ssl/${tolower:%1}  -d
    RewriteRule ^(.*) /home/doms/assets.http2.hs-example.de/subs-ssl/${tolower:%1}$1  [last]

    FcgidInitialEnv HTTP_PHP_BIN /usr/lib/cgi-bin/php
    AddType application/x-httpd-php .php
    Action application/x-httpd-php /fastcgi-bin/hs-phpstub
</VirtualHost>
