-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapache-mod_geoip2.pp
More file actions
38 lines (34 loc) · 903 Bytes
/
apache-mod_geoip2.pp
File metadata and controls
38 lines (34 loc) · 903 Bytes
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
#
# Puppet manifest to install geoip apache module.
#
include apache
package { 'libapache2-mod-geoip' :
ensure => installed
}
class apache::mod::geoip {
::apache::mod { 'geoip': }
# Template uses no variables
file { 'geoip.conf':
ensure => file,
path => "${::apache::mod_dir}/geoip.conf",
content => '
<IfModule mod_geoip.c>
GeoIPEnable On
GeoIPEnableUTF8 On
# GeoIPOutput [Notes|Env|All]
GeoIPOutput All
GeoIPScanProxyHeaders On
<IfModule prefork.c>
GeoIPDBFile /usr/share/GeoIP/GeoIPCity.dat
</IfModule>
<IfModule !prefork>
GeoIPDBFile /usr/share/GeoIP/GeoIPCity.dat MMapCache
</IfModule>
</IfModule>
',
require => Exec["mkdir ${::apache::mod_dir}"],
before => File[$::apache::mod_dir],
notify => Service['httpd'],
}
}
include apache::mod::geoip