1 |
<%- if use_ssl then |
2 |
port = 443 |
3 |
else |
4 |
port = 80 |
5 |
end |
6 |
-%> |
7 |
|
8 |
<VirtualHost *:<%= port %>> |
9 |
<%- if use_ssl then -%> |
10 |
SSLEngine on |
11 |
SSLCertificateFile /etc/ssl/apache/<%= name %>.pem |
12 |
SSLCertificateKeyFile /etc/ssl/apache/<%= name %>.pem |
13 |
<%- end -%> |
14 |
ServerName <%= real_vhost %> |
15 |
<%- server_aliases.each do |key| -%> |
16 |
ServerAlias <%= key %> |
17 |
<%- end -%> |
18 |
DocumentRoot <%= location %> |
19 |
|
20 |
<%- 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 |
<%- aliases.each_pair do |key,value| -%> |
29 |
Alias <%= key %> <%= value %> |
30 |
<%- end -%> |
31 |
<%= content %> |
32 |
|
33 |
<Location /> |
34 |
Allow from all |
35 |
</Location> |
36 |
</VirtualHost> |
37 |
|