Puppet Class: apache::vhosts

Defined in:
manifests/vhosts.pp

Summary

Creates `apache::vhost` defined types.

Overview

host parameters or Configuring virtual hosts in the README section.

Note:

See the ‘apache::vhost` defined type’s reference for a list of all virtual

Examples:

To create a [name-based virtual host](httpd.apache.org/docs/current/vhosts/name-based.html) ‘custom_vhost_1`

class { 'apache::vhosts':
  vhosts => {
    'custom_vhost_1' => {
      'docroot' => '/var/www/custom_vhost_1',
      'port'    => 81,
    },
  },
}

Parameters:

  • vhosts (Hash) (defaults to: {})

    A hash, where the key represents the name and the value represents a hash of ‘apache::vhost` defined type’s parameters.



21
22
23
24
25
26
# File 'manifests/vhosts.pp', line 21

class apache::vhosts (
  Hash $vhosts = {},
) {
  include apache
  create_resources('apache::vhost', $vhosts)
}