/[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 1632 - (show annotations) (download)
Tue May 24 09:15:58 2011 UTC (13 years, 4 months ago) by boklm
File size: 1376 byte(s)
use second variable, as it is not possible to reassign parameter
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 CustomLog <%= real_access_logfile %> combined
28 ErrorLog <%= real_error_logfile %>
29
30 <%- if enable_public_html -%>
31 #TODO add the rest
32 UserDir public_html
33 <%- else -%>
34 <IfModule mod_userdir.c>
35 UserDir disabled
36 </IfModule>
37 <%- end -%>
38
39 <%- aliases.keys.sort {|a,b| a.size <=> b.size }.reverse.each do |key| -%>
40 Alias <%= key %> <%= aliases[key] %>
41 <%- end -%>
42
43 <%= content %>
44
45 <%- if options.length > 0 -%>
46 <Directory <%= location %>>
47 Options <%= options.join(" ") %>
48 </Directory>
49 <%- end -%>
50
51 <Location />
52 Allow from all
53 </Location>
54 </VirtualHost>
55

  ViewVC Help
Powered by ViewVC 1.1.30