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