HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2019-03-01 2019e012ffbe3f2b87c702fa58a9d0005f89a33f
commit | author | age
6208e0 1
PH 2 # This file is managed by HSAdmin.
3 # Do not edit manually. Changes will be overwritten.
4 #
5
6 <VirtualHost ${pac.curINetAddr.inetAddr}:80 ${pac.oldINetAddr.inetAddr}:80>
7     ServerName ${dom.name}
bf2b35 8     ServerAlias ${dom.serveraliases}
6208e0 9     ServerAdmin webmaster@${dom.name}
PH 10
11     SuexecUserGroup ${dom.user.name} ${pac.name}
12
bf2b35 13     PassengerEnabled Off
ee5e33 14     PassengerUser ${dom.user.name}
MH 15     PassengerGroup ${pac.name}
16     PassengerAppRoot /home/doms/${dom.name}/app/
17
6208e0 18     DocumentRoot /home/doms/${dom.name}/htdocs
PH 19
20     Alias /cgi-bin/ /home/doms/${dom.name}/cgi/
21     Alias /fastcgi-bin/ /home/doms/${dom.name}/fastcgi/
bf2b35 22 #if( ${letsencrypt} )
4ec40e 23     Alias /.well-known/acme-challenge/ /var/lib/hostsharing/acmebot/webroot/${dom.name}/
bf2b35 24 #end
6208e0 25
PH 26     <Directory />
46a14f 27         PassengerEnabled Off
6208e0 28         Options -ExecCGI ${includes} ${indexes} ${multiviews} +SymLinksIfOwnerMatch
PH 29     </Directory>
30
31     <Directory /home/doms/${dom.name}/>
46a14f 32         PassengerEnabled On
f423b9 33         AllowOverride AuthConfig FileInfo Indexes Limit Options=ExecCGI,IncludesNoExec,Indexes,MultiViews,SymLinksIfOwnerMatch,PassengerNodejs,PassengerPython,PassengerRuby,PassengerAppEnv
6208e0 34     </Directory>
PH 35
36     <Location /cgi-bin/>
46a14f 37         PassengerEnabled Off
6208e0 38         SetHandler cgi-script
340686 39         Options +ExecCGI +IncludesNoExec -Indexes -MultiViews +SymLinksIfOwnerMatch
6208e0 40     </Location>
PH 41
42     <Location /fastcgi-bin/>
46a14f 43         PassengerEnabled Off
6208e0 44         SetHandler fcgid-script
340686 45         Options +ExecCGI +IncludesNoExec -Indexes -MultiViews +SymLinksIfOwnerMatch
6208e0 46     </Location>
PH 47
cee6cc 48 #if( ${phplatest} )
PH 49     FcgidInitialEnv HTTP_PHP_BIN /usr/lib/cgi-bin/php7.3
b28d34 50
605701 51 #end
6208e0 52     RewriteEngine On
PH 53     RewriteOptions Inherit
54
55     RewriteCond %{REQUEST_URI} !^/cgi-bin/
bf2b35 56     RewriteCond %{REQUEST_URI} !^/fastcgi-bin/
PH 57 #if( ${letsencrypt} )
58     RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/
59 #end
2e99a9 60     RewriteCond %{HTTP_HOST} ^(.+)\.${dom.name}\.?(:[0-9]+)?$ [novary]
747bf3 61     RewriteCond /home/doms/${dom.name}/subs/#[[${tolower:%1} ]]# -d
6365b4 62     RewriteRule ^(.*) /home/doms/${dom.name}/subs/#[[${tolower:%1}$1 ]]# [last] 
MH 63      
6208e0 64 #if( !${htdocsfallback} )
PH 65     RewriteCond %{REQUEST_URI} !^/cgi-bin/
7a0aad 66     RewriteCond %{REQUEST_URI} !^/fastcgi-bin/
bf2b35 67 #if( ${letsencrypt} )
PH 68     RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/
69 #end
89b2b3 70     RewriteCond %{HTTP_HOST} ^(.+)\.${dom.name}\.?(:80)?$ [novary]
747bf3 71     RewriteCond /home/doms/${dom.name}/subs/#[[${tolower:%1} ]]# !-d
6208e0 72     RewriteRule ^(.*) - [redirect=404,last]
6365b4 73     
MH 74 #end
6208e0 75     AddType application/x-httpd-php .php .php5 .php4 .php3
PH 76     Action application/x-httpd-php /fastcgi-bin/phpstub
77 </VirtualHost>
78
79 <VirtualHost ${pac.curINetAddr.inetAddr}:443 ${pac.oldINetAddr.inetAddr}:443>
80     ServerName ${dom.name}
bf2b35 81     ServerAlias ${dom.serveraliases}
a62974 82     ServerAdmin webmaster@${dom.name}
6208e0 83
PH 84     SuexecUserGroup ${dom.user.name} ${pac.name}
ee5e33 85     
bf2b35 86     PassengerEnabled Off
ee5e33 87     PassengerUser ${dom.user.name}
MH 88     PassengerGroup ${pac.name}
89     PassengerAppRoot /home/doms/${dom.name}/app-ssl/
6208e0 90
PH 91     SSLEngine On
2c91cd 92     SSLCertificateFile /etc/apache2/pems-enabled/${dom.name}.crt
PH 93     SSLCertificateKeyFile /etc/apache2/pems-enabled/${dom.name}.key
94     SSLCertificateChainFile /etc/apache2/pems-enabled/${dom.name}.chain
ee5e33 95        
6208e0 96     DocumentRoot /home/doms/${dom.name}/htdocs-ssl
PH 97
98     Alias /cgi-bin/ /home/doms/${dom.name}/cgi-ssl/
99     Alias /fastcgi-bin/ /home/doms/${dom.name}/fastcgi-ssl/
bf2b35 100 #if( ${letsencrypt} )
4ec40e 101     Alias /.well-known/acme-challenge/ /var/lib/hostsharing/acmebot/webroot/${dom.name}/
bf2b35 102 #end
6208e0 103
PH 104     <Directory />
66113d 105         SSLRequireSSL On
46a14f 106         PassengerEnabled Off
6208e0 107         Options -ExecCGI ${includes} ${indexes} ${multiviews} +SymLinksIfOwnerMatch
PH 108     </Directory>
109
110     <Directory /home/doms/${dom.name}/>
10baac 111         PassengerEnabled On
f423b9 112         AllowOverride AuthConfig FileInfo Indexes Limit Options=ExecCGI,IncludesNoExec,Indexes,MultiViews,SymLinksIfOwnerMatch,PassengerNodejs,PassengerPython,PassengerRuby,PassengerAppEnv
6208e0 113     </Directory>
PH 114
115     <Location /cgi-bin/>
10baac 116         PassengerEnabled Off
6208e0 117         SetHandler cgi-script
340686 118         Options +ExecCGI +IncludesNoExec -Indexes -MultiViews +SymLinksIfOwnerMatch
6208e0 119     </Location>
PH 120
121     <Location /fastcgi-bin/>
a62974 122         PassengerEnabled Off
6208e0 123         SetHandler fcgid-script
340686 124         Options +ExecCGI +IncludesNoExec -Indexes -MultiViews +SymLinksIfOwnerMatch
6208e0 125     </Location>
PH 126     
127     RewriteEngine On
128     RewriteOptions Inherit
129     
130     RewriteCond %{REQUEST_URI} !^/cgi-bin/
131     RewriteCond %{REQUEST_URI} !^/fastcgi-bin/    
bf2b35 132 #if( ${letsencrypt} )
PH 133     RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/
134 #end
747bf3 135     RewriteCond %{HTTP_HOST} ^(.+)\.${dom.name}\.?(:[0-9]+)?$ [novary]
PH 136     RewriteCond /home/doms/${dom.name}/subs-ssl/#[[${tolower:%1} ]]# -d
6365b4 137     RewriteRule ^(.*) /home/doms/${dom.name}/subs-ssl/#[[${tolower:%1}$1 ]]# [last] 
MH 138           
6208e0 139 #if( !${htdocsfallback} )
PH 140     RewriteCond %{REQUEST_URI} !^/cgi-bin/
7a0aad 141     RewriteCond %{REQUEST_URI} !^/fastcgi-bin/
bf2b35 142 #if( ${letsencrypt} )
PH 143     RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/
144 #end
747bf3 145     RewriteCond %{HTTP_HOST} ^(.+)\.${dom.name}\.?(:443)?$ [novary]
PH 146     RewriteCond /home/doms/${dom.name}/subs-ssl/#[[${tolower:%1} ]]# !-d
6208e0 147     RewriteRule ^(.*) - [redirect=404,last]
6365b4 148     
6208e0 149 #end
PH 150     AddType application/x-httpd-php .php .php5 .php4 .php3
151     Action application/x-httpd-php /fastcgi-bin/phpstub
d24c19 152
6208e0 153 </VirtualHost>