blob: 807a2a470d6415bf64799ed9a75b5eb57136a010 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
<%- if use_ssl then
port = 443
else
port = 80
end
-%>
<VirtualHost *:<%= port %>>
<%- if use_ssl then -%>
SSLEngine on
<%- if wildcard_sslcert then -%>
SSLCertificateFile /etc/ssl/wildcard.<%= domain %>.crt
SSLCertificateKeyFile /etc/ssl/wildcard.<%= domain %>.key
SSLCACertificateFile /etc/ssl/wildcard.<%= domain %>.pem
SSLVerifyClient None
<%- else -%>
SSLCertificateFile /etc/ssl/apache/<%= real_vhost %>.pem
SSLCertificateKeyFile /etc/ssl/apache/<%= real_vhost %>.pem
<%- end -%>
<%- end -%>
ServerName <%= real_vhost %>
<%- server_aliases.each do |key| -%>
ServerAlias <%= key %>
<%- end -%>
DocumentRoot <%= location %>
<%- if enable_public_html -%>
#TODO add the rest
UserDir public_html
<%- else -%>
<IfModule mod_userdir.c>
UserDir disabled
</IfModule>
<%- end -%>
<%- aliases.each_pair do |key,value| -%>
Alias <%= key %> <%= value %>
<%- end -%>
<%= content %>
<Location />
Allow from all
</Location>
</VirtualHost>
|