1 class apache::mod::remoteip (
2 $header = 'X-Forwarded-For',
3 $proxy_ips = [ '127.0.0.1' ],
4 $proxies_header = undef,
5 $trusted_proxy_ips = undef,
6 $apache_version = $::apache::apache_version
8 if versioncmp($apache_version, '2.4') < 0 {
9 fail('mod_remoteip is only available in Apache 2.4')
12 ::apache::mod { 'remoteip': }
18 # - $trusted_proxy_ips
19 file { 'remoteip.conf':
21 path => "${::apache::mod_dir}/remoteip.conf",
22 content => template('apache/mod/remoteip.conf.erb'),
23 require => Exec["mkdir ${::apache::mod_dir}"],
24 before => File[$::apache::mod_dir],
25 notify => Service['httpd'],