1 |
misc |
928 |
<%- if use_ssl then |
2 |
misc |
621 |
port = 443 |
3 |
|
|
else |
4 |
|
|
port = 80 |
5 |
|
|
end |
6 |
misc |
928 |
-%> |
7 |
misc |
621 |
|
8 |
|
|
<VirtualHost *:<%= port %>> |
9 |
misc |
928 |
<%- if use_ssl then -%> |
10 |
misc |
621 |
SSLEngine on |
11 |
|
|
SSLCertificateFile /etc/ssl/apache/<%= name %>.pem |
12 |
|
|
SSLCertificateKeyFile /etc/ssl/apache/<%= name %>.pem |
13 |
misc |
928 |
<%- end -%> |
14 |
|
|
ServerName <%= real_vhost %> |
15 |
misc |
935 |
<%- server_aliases.each do |key| -%> |
16 |
|
|
ServerAlias <%= key %> |
17 |
|
|
<%- end -%> |
18 |
misc |
928 |
DocumentRoot <%= location %> |
19 |
misc |
621 |
|
20 |
misc |
930 |
<%- if enable_public_html -%> |
21 |
|
|
#TODO add the rest |
22 |
|
|
UserDir public_html |
23 |
|
|
<%- else -%> |
24 |
|
|
<IfModule mod_userdir.c> |
25 |
|
|
UserDir disabled |
26 |
|
|
</IfModule> |
27 |
|
|
<%- end -%> |
28 |
misc |
932 |
<%- aliases.each_pair do |key,value| -%> |
29 |
|
|
Alias <%= key %> <%= value %> |
30 |
|
|
<%- end -%> |
31 |
misc |
928 |
<%= content %> |
32 |
misc |
182 |
|
33 |
|
|
<Location /> |
34 |
|
|
Allow from all |
35 |
|
|
</Location> |
36 |
|
|
</VirtualHost> |
37 |
|
|
|