summaryrefslogtreecommitdiff
path: root/puppet/modules/site_webapp/manifests/apache.pp
blob: 581922cb8647a9eb015665a3d8a8c15bb8df2557 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
class site_webapp::apache {

  $web_api          = hiera('api')
  $api_domain       = $web_api['domain']
  $api_port         = $web_api['port']

  $web_domain       = hiera('domain')
  $domain_name      = $web_domain['name']

  include x509::variables
  include site_config::x509::commercial::cert
  include site_config::x509::commercial::key
  include site_config::x509::commercial::ca

  Class['Site_config::X509::Commercial::Key'] ~> Service[apache]
  Class['Site_config::X509::Commercial::Cert'] ~> Service[apache]
  Class['Site_config::X509::Commercial::Ca'] ~> Service[apache]

  class { '::apache': no_default_site => true, ssl => true }

  include site_apache::module::headers
  include site_apache::module::rewrite
  include site_apache::module::alias
  include site_apache::module::expires

  class { 'passenger': use_munin => false }

  apache::vhost::file {
    'leap_webapp':
      content => template('site_apache/vhosts.d/leap_webapp.conf.erb')
  }

  apache::vhost::file {
    'api':
      content => template('site_apache/vhosts.d/api.conf.erb')
  }

}