forked from rvagg/archived-mod_geoip2_xff.old
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
72 lines (47 loc) · 1.98 KB
/
INSTALL
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
===========================================================================
Requirements:
Apache 2.0.40 or higher installed If using RPM, the httpd-devel package containing apxs may need to be installed
GeoIP 1.4.3 or higher installed, download from http://maxmind.com/download/geoip/api/c
===========================================================================
To build mod_geoip as a dynamically loadable module:
apxs -i -a -L/usr/local/lib -I/usr/local/include -lGeoIP -c mod_geoip.c
-I/usr/local/include is where the GeoIP.h header file is installed
-L/usr/local/lib is where the libGeoIP library is located
This will put the correct LoadModule statement.
You will need to add:
===========================================================================
Configuration
To enable the module, place
<IfModule mod_geoip.c>
GeoIPEnable On
</IfModule>
inside your httpd.conf file. ( You don't have to have the <IfModule> block,
but it's always a good idea.
( You can optionally specify the data file by using:
<IfModule mod_geoip.c>
GeoIPEnable On
GeoIPDBFile /usr/tmp/GeoIP.dat
</IfModule>
)
See the README file for more details on the configuration
===========================================================================
Troubleshooting
On RedHat 9, apxs places
LoadModule geoip_module /usr/lib/httpd/modules/mod_geoip.so
Inside a
<IfModule worker.c>
</IfModule>
Block.
If mod_geoip doesn't work, try taking the LoadModule geoip_module line outside
the <IfModule worker.c> block.
If you get the following errors:
parse error before "geoip_module"
warning: data definition has no type or storage class
Or
syntax error before "geoip_module"
Make sure that the apxs script belongs to the Apache server you are using.
These error messages result from using a Apache 1.3 apxs script with
a Apache 2.x server.
If you get a "libGeoIP.so.1: cannot open shared object file: No such file or
directory" error, add /usr/local/lib to /etc/ld.so.conf then run
/sbin/ldconfig /etc/ld.so.conf