dev/provisioning/modules/apache/examples/vhost_ssl.pp
author ymh <ymh.work@gmail.com>
Thu, 03 Nov 2016 09:44:11 +0100
changeset 390 f4fed295115b
parent 28 b0b56e0f8c7f
permissions -rw-r--r--
put virtualenv activation during build in comment. That means that for the moment the build machine must be provisionned beforehand, or ansible must be available globally

## 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,
}