Featured Posts

GoAccess is an interactive and website / web-server log analyzer tool currently better than the ApacheTop interface. It provides fast and valuable HTTP statistics for system administrators that require a visual...

Readmore

AjaxMyTop AjaxMyTop is a Web-based tool featuring an AJAX user interface for monitoring a MySQL server. Installing and configuring is fairly simple which you can done it within 2 minutes. [caption id="attachment_587"...

Readmore

Mod_spin is a content handler and/or a filter, meaning, for a specified file extension, mod_spin will read the file (or other input), parse it into an Abstract Syntax Tree (AST) and then replace the occurrences...

Readmore

Server Monitoring using DSTAT DSTAT an excellent tool which combines the overall stats of vmstat, iostat, netstat and ifstat. Dstat allows us to view all of the system resources in the real-time including the network bandwidth, network...

Readmore

BWM-NG Monitoring Network Bandwidth and Disk I/O using BWM-NG BWN-NG (Bandwidth-NG) is old and simple tool to monitor the bandwidth and disk I/O including the RAMdisk usage, this tool really helps the...

Readmore

  • Prev
  • Next

Mod_GeoIP

Posted on : 09-09-2010 | By : admin | In : Web Server

Tags:

0

Installing Free mod_GeoIP for Apache 2.x / Cpanel / CentOS


Mod_GeoIP looks up the IP address of the client end user. If you need to input the IP address instead of simply using the client IP address. For the country database, mod_geoip sets two environment variables, GEOIP_COUNTRY_CODE and GEOIP_COUNTRY_NAME. For other databases, see the README file included with the mod_geoip API.

Installing mod_geoip on cpanel


The easyway of installing mod_geoip is by using the cpanel’s Easyapache custom modules installation method:
Download mod_geoip


Use the Easyapache in the WHM and on the list of modules under apache you will see the mod_Geoip listed there, recompile apache by selecting the modules. After finishing the recompile follow the configuration part below to configure the settings.

Installing mod_geoip on centos and fedora :


Installation of mod_geoip module requires two rpm (GeoIP which holds the ip database and mod_geoip for apache), i guess you have already installed httpd 2.x version sucessfully in your server.

The rpm installation will include and configure the mod_geoip modules on apache. You will then find the GeoIP database (GeoIP.dat) in the /usr/share/GeoIP directory. YOu can get the latest ip db from http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz and upload the new database inside the /usr/share/GeoIP/ .

To make sure the mod_geoip is working properly, create the following php file in the default html doc root and try access it in your web browser, for example :

file name : geotest.php

  • <?php
  • print_r($_SERVER);
  • ?>

http://<serverip>/geotest.php

And you should be able to see a list of geoip stats about your location and isp. Follow the instruction on the http://www.maxmind.com/app/mod_geoip official site to configure the country based block/allow.

External links :

Mod_GeoIP official website :

Installing Mod_Geoip on Freebsd/lighttpd :

Write a comment

You must be logged in to post a comment.