Forum Moderators: phranque
i want to install mod_geoip module in the apache sever, can you give me some step by step process for doing the same
i have got this module file which has some c++ source code
what is the difference between dymanically loading module and statically loading
i have got the following instructions to be placed
Can you explain in simple english where to add these codes and where to place that c++ source code file,
thank you
===========================================================================
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"
install 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.
===========================================================================