dev/provisioning/modules/apache/examples/vhost_ssl.pp
changeset 28 b0b56e0f8c7f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dev/provisioning/modules/apache/examples/vhost_ssl.pp	Fri Jan 15 15:35:00 2016 +0100
@@ -0,0 +1,23 @@
+## SSL-enabled vhosts
+# SSL-enabled vhosts respond only to HTTPS queries.
+
+# Base class. Turn off the default vhosts; we will be declaring
+# all vhosts below.
+class { 'apache':
+  default_vhost => false,
+}
+
+# Non-ssl vhost
+apache::vhost { 'first.example.com non-ssl':
+  servername => 'first.example.com',
+  port       => '80',
+  docroot    => '/var/www/first',
+}
+
+# SSL vhost at the same domain
+apache::vhost { 'first.example.com ssl':
+  servername => 'first.example.com',
+  port       => '443',
+  docroot    => '/var/www/first',
+  ssl        => true,
+}