view modules/apache/examples/vhost_ssl.pp @ 478:adf6fe9bbc17

Update Puppet modules to latest versions
author IBBoard <dev@ibboard.co.uk>
date Thu, 29 Aug 2024 18:47:29 +0100
parents b8d6ada284dd
children
line wrap: on
line source

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