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