Puppet Class: apache::mod::rpaf

Defined in:
manifests/mod/rpaf.pp

Summary

Installs and configures `mod_rpaf`.

Overview

Parameters:

  • sethostname (Any) (defaults to: true)

    Toggles whether to update vhost name so ServerName and ServerAlias work.

  • proxy_ips (Any) (defaults to: [ '127.0.0.1' ])

    List of IPs & bitmasked subnets to adjust requests for

  • header (Any) (defaults to: 'X-Forwarded-For')

    Header to use for the real IP address.

  • template (Any) (defaults to: 'apache/mod/rpaf.conf.erb')

    Path to template to use for configuring mod_rpaf.

See Also:



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'manifests/mod/rpaf.pp', line 18

class apache::mod::rpaf (
  $sethostname = true,
  $proxy_ips   = [ '127.0.0.1' ],
  $header      = 'X-Forwarded-For',
  $template    = 'apache/mod/rpaf.conf.erb'
) {
  include ::apache
  ::apache::mod { 'rpaf': }

  # Template uses:
  # - $sethostname
  # - $proxy_ips
  # - $header
  file { 'rpaf.conf':
    ensure  => file,
    path    => "${::apache::mod_dir}/rpaf.conf",
    mode    => $::apache::file_mode,
    content => template($template),
    require => Exec["mkdir ${::apache::mod_dir}"],
    before  => File[$::apache::mod_dir],
    notify  => Class['apache::service'],
  }
}