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