/[adm]/puppet/modules/apache/templates/vhost_base.conf
ViewVC logotype

Contents of /puppet/modules/apache/templates/vhost_base.conf

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1599 - (show annotations) (download)
Sun May 8 19:12:41 2011 UTC (12 years, 11 months ago) by pterjan
File size: 1288 byte(s)
Allow setting options in vhost base template
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 <%- if wildcard_sslcert == 'true' then -%>
12 SSLCertificateFile /etc/ssl/wildcard.<%= domain %>.crt
13 SSLCertificateKeyFile /etc/ssl/wildcard.<%= domain %>.key
14 SSLCACertificateFile /etc/ssl/wildcard.<%= domain %>.pem
15 SSLVerifyClient None
16 <%- else -%>
17 SSLCertificateFile /etc/ssl/apache/<%= real_vhost %>.pem
18 SSLCertificateKeyFile /etc/ssl/apache/<%= real_vhost %>.pem
19 <%- end -%>
20 <%- end -%>
21 ServerName <%= real_vhost %>
22 <%- server_aliases.each do |key| -%>
23 ServerAlias <%= key %>
24 <%- end -%>
25 DocumentRoot <%= location %>
26
27 <%- if enable_public_html -%>
28 #TODO add the rest
29 UserDir public_html
30 <%- else -%>
31 <IfModule mod_userdir.c>
32 UserDir disabled
33 </IfModule>
34 <%- end -%>
35
36 <%- aliases.keys.sort {|a,b| a.size <=> b.size }.reverse.each do |key| -%>
37 Alias <%= key %> <%= aliases[key] %>
38 <%- end -%>
39
40 <%= content %>
41
42 <%- if options.length -%>
43 <Directory <%= location %>>
44 Options <%= options.join(" ") %>
45 </Directory>
46 <%- end -%>
47
48 <Location />
49 Allow from all
50 </Location>
51 </VirtualHost>
52

  ViewVC Help
Powered by ViewVC 1.1.30