=========================================================================== Requirements: Apache 1.3.x installed. If using RPM, the httpd-devel package containing apxs may need to be installed GeoIP 1.3.x installed, download from http://maxmind.com/download/geoip/api/c =========================================================================== To build mod_geoip as a dynamically loadable module: apxs -cia -I/usr/local/include -L/usr/local/lib -lGeoIP /path/to/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 (If "Sorry, no DSO support for Apache available" error, try recompiling Apache with ./configure --enable-module=so ) (If you get a "apxs:Break:Command" error, see http://www.faqts.com/knowledge_base/view.phtml/aid/11449/fid/1 ) (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 ) Note that "-i" installs mod_geoip.so to your/apache/install/libexec Note that "-a" loads the module you need to put a LoadModule line in your httpd.conf: LoadModule geoip_module libexec/mod_geoip.so See the apxs manpage for more details. You may also need to put a AddModule line in your httpd.conf: AddModule mod_geoip.c =========================================================================== To build mod_geoip statically into Apache: cd path/to/apache_src cp path/to/mod_geoip.c src/modules/extra/ ./configure --prefix=/usr/local/apache \ --activate-module=src/modules/extra/mod_geoip.c \ [... more apaci options ...] make make install =========================================================================== Configuration To enable the module, place GeoIPEnable On inside your httpd.conf file. =========================================================================== Troubleshooting On FreeBSD, there has been a report of mod_geoip not compiling with the GeoIP C library 1.2.2 from freebsd sites (pre-compiled). It worked once all the pre-compiled files were removed and 1.2.2 was compiled from source. If you get one of the following errors: syntax error before "geoip_module" parse error before "geoip_module" warning: data definition has no type or storage class Make sure that the apxs script belongs to the Apache server you are using. These error messages result from using a Apache 2.0 apxs script with a Apache 1.3 server.