Categories: Hostripples Featured

Install mod_geoip: How to ?

1. mkdir /home/uruser/geoip
cd /home/uruser/geoip

2. Download and install library:

wget http://www.maxmind.com/download/geoip/api/…/c/GeoIP.tar.gz

http://www.maxmind.com/download/geoip/api/c/GeoIP-1.3.4.tar.gz

tar xzfv GeoIP.tar.gz

cd GeoIP*

./configure
make
make check
make install

cd ..

3. Download and build Module:

mkdir mod_geoip
cd mod_geoip

wget http://www.maxmind.com/download/geoip/api/mod_geoip/mod_geoip_1.2.9.tar.gz

Download: http://www.maxmind.com/download/geoip/api/mod_geoip/

wget http://www.maxmind.com/download/geoip/api/mod_geoip/mod_geoip_1.2.9.tar.gz

tar xzfv mod_geoip_1.1.1.tar.gz

cd mod_geoip_1.1.1

/usr/local/apache/bin/apxs  -cia -I/usr/local/include -L/usr/local/lib -lGeoIP mod_geoip.c

4. Add /usr/local/lib as a loadable dynamic link:

edit /etc/ld.so.conf and add /usr/local/lib at the bottom so it looks like this:

/usr/kerberos/lib
/usr/lib/mysql
/usr/X11R6/lib
/usr/local/lib

Then execute /sbin/ldconfig /etc/ld.so.conf

5. Review httpd.conf . You should have seen a backup of the httpd.conf has been made when building the module as mod_geoip info has been inserted.

You’ll find 2 lines inserted about mod_geoip.
First one:

LoadModule geoip_module lib/apache/mod_geoip.so

change to

LoadModule geoip_module /usr/lib/apache/mod_geoip.so

Add below that line:

GeoIPEnable On

the the second line is OK … just move it to the AddModule section to keep httpd.conf pretty:)

AddModule mod_geoip.c

6. Go and restart Apache and you should not get any error.
service httpd restart.

 


HR-ADMIN

Recent Posts

This Diwali, Give Your Website the Glow It Deserves — Host Smarter,Rank Higher

Every Diwali Brings New Light, New Beginnings, and New Opportunities In today’s digital world, your website is the Diya that…

10 hours ago

What Are the Best WordPress Photo Gallery Plugins for 2026?

Photography is not just about taking pictures—it’s about presenting them beautifully. For photographers and creative bloggers, WordPress photo gallery plugins…

2 weeks ago

How Can You Prepare Your Ecommerce Site/blog for Festivals?

Festivals are more than cultural celebrations—they’re golden opportunities for e-commerce stores and bloggers to attract, engage, and convert audiences. During…

3 weeks ago

Shared Hosting: Migrating Your Site Seamlessly

If you’re new to web hosting, the idea of moving your website from one provider to another might sound intimidating.…

1 month ago

Top 15 WooCommerce Plugins to Power Your eCommerce Store in 2025

WooCommerce powers over 5 million online stores, and its true potential comes alive with plugins that enhance functionality. The right…

1 month ago