summaryrefslogtreecommitdiff
path: root/templates/site.erb
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-11-29 00:23:21 -0200
committerSilvio Rhatto <rhatto@riseup.net>2011-11-29 00:23:21 -0200
commit235caa63ec1d56ee63afec6a71acad2169f12b3c (patch)
tree84953c2c0704b3691d5c5b5bb22315d44cc756eb /templates/site.erb
parent2a71be949e7ed1b65d30c074d6e8673295dedf4e (diff)
downloadpuppet-apache-235caa63ec1d56ee63afec6a71acad2169f12b3c.tar.gz
puppet-apache-235caa63ec1d56ee63afec6a71acad2169f12b3c.tar.bz2
Adding SSL suport
Diffstat (limited to 'templates/site.erb')
-rw-r--r--templates/site.erb31
1 files changed, 30 insertions, 1 deletions
diff --git a/templates/site.erb b/templates/site.erb
index 80ad807..5a9f074 100644
--- a/templates/site.erb
+++ b/templates/site.erb
@@ -1,5 +1,5 @@
# begin vhost for <%= title %>
-<VirtualHost *:80>
+<VirtualHost <%= listen %>:80>
ServerName <%= title %>.<%= hosting_domain %>
<% if server_alias != false %> ServerAlias <%= server_alias %><% end %>
DocumentRoot <%= docroot %>
@@ -18,3 +18,32 @@
<% end %>
</VirtualHost>
# end vhost for <%= title %>
+<% if ssl == true %>
+# begin ssl vhost for <%= title %>
+<VirtualHost <%= listen %>:443>
+ ServerName <%= title %>.<%= hosting_domain %>
+<% if server_alias != false %> ServerAlias <%= server_alias %><% end %>
+ DocumentRoot <%= docroot %>
+<% if redirect_match != false %> RedirectMatch ^/$ <%= protocol %>://<%= title %>.<%= hosting_domain %>/<%= redirect_match %><% end %>
+<% if redirect != false %> Redirect <%= redirect %><% end %>
+<% if aliases != false %><% aliases.each do |map| -%>
+ Alias <%= map %>
+<% end -%><% end -%>
+<% if use != false %><% use.each do |instance| -%>
+ Use <%= instance %>
+<% end -%><% end -%>
+<% if mpm == true %>
+ <IfModule mpm_itk_module>
+ AssignUserId <%= user %> <%= gid %>
+ </IfModule>
+<% end %>
+<% if server_alias == true %>
+ # SSL Configuration
+ SSLEngine on
+ SSLProtocol -all +SSLv3 +TLSv1
+ SSLCipherSuite HIGH:MEDIUM:!aNULL:!SSLv2:!MD5:@STRENGTH
+ SSLHonorCipherOrder on
+<% end %>
+</VirtualHost>
+# end ssl vhost for <%= title %>
+<% end %>