Revision
196
Author
misc
Date
2010-11-08 01:37:59 +0100 (Mon, 08 Nov 2010)

Log Message

- add logic for using ssl certificate ( no SNI for the moment, but should be done later )

Modified Paths

Modified: puppet/modules/apache/templates/vhost_catalyst_app.conf
===================================================================
--- puppet/modules/apache/templates/vhost_catalyst_app.conf	2010-11-08 00:21:42 UTC (rev 195)
+++ puppet/modules/apache/templates/vhost_catalyst_app.conf	2010-11-08 00:37:59 UTC (rev 196)
@@ -1,4 +1,17 @@
-<VirtualHost *:80>
+<% if use_ssl then
+    port = 443
+else
+    port = 80
+end
+%>
+
+<VirtualHost *:<%= port %>>
+<% if use_ssl then %>
+        SSLEngine on
+        #TODO deploy SNI later 
+        SSLCertificateFile /etc/ssl/apache/apache.pem
+        SSLCertificateKeyFile /etc/ssl/apache/apache.pem
+<% end %>
         ServerName <%= name %>
         # Serve static content directly
         DocumentRoot  /dev/null