Installing mod_geoip for Apache2 On Ubuntu 9.10
Installing mod_geoip for Apache2 On Ubuntu 9.10Version 1.0 This guide explains how to set up mod_geoip with Apache2 on an Ubuntu 9.10 system. mod_geoip looks up the IP address of the client end user. This allows you to redirect or block users based on their country. You can also use this technology for your OpenX (formerly known as OpenAds or phpAdsNew) ad server to allow geo targeting. I do not issue any guarantee that this will work for you!
1 Preliminary NoteI'm assuming that you have a running Ubuntu 9.10 system with a working Apache2, e.g. as shown in this tutorial: The Perfect Server - Ubuntu Karmic Koala (Ubuntu 9.10) [ISPConfig 2]. Because we must run all the steps from this tutorial with root privileges, we can either prepend all commands in this tutorial with the string sudo, or we become root right now by typing sudo su
2 Installing mod_geoipTo install mod_geoip, we simply run: aptitude install libapache2-mod-geoip Then we open /etc/apache2/mods-available/geoip.conf and uncomment the GeoIPDBFile line so that the file looks as follows: vi /etc/apache2/mods-available/geoip.conf
Next we restart Apache: /etc/init.d/apache2 restart That's it already!
3 A Short TestTo see if mod_geoip is working correctly, we can create a small PHP file in one of our web spaces (e.g. /var/www): vi /var/www/geoiptest.php
Call that file in a browser, and it should display your country (make sure that you're calling the file from a public IP address, not a local one).
4 Use CasesYou can use mod_geoip to redirect or block/allow users based on their country. You can find some useful examples for this here: http://www.maxmind.com/app/mod_geoip If you want to use mod_geoip with OpenX/OpenAds/phpAdsNew, this PDF file has instructions for it: http://www.maxmind.com/openads_geoip.pdf
5 Links
|
www.seamlessenterprise.com
One number. One voicemail. Seize the lead. Sprint Mobile Integration.
www.seamlessenterprise.com
One Number. One Voicemail.
Make it easier for clients to reach you. Turn your desk phone and mobile phone into one with Sprint Mobile Integration.
www.seamlessenterprise.com
One number. One voicemail. Sprint Mobile Integration.
www.seamlessenterprise.com
One number. one voicemail. Seize the lead with Sprint. Learn more
AT&T Synaptic Compute as a Service. Boost your power on demand.
Trial: IBM Cognos Express Reporting, Analysis & Planning
Learn benefits of Simpana software.
View the Gartner Video
Sprint 4G - The Ultimate Mobile Broadband
Click here
SAP-Business Objects Crystal Reports Server
Complete reporting without hidden costs. Free Trial








Recent comments
19 hours 16 min ago
22 hours 7 min ago
1 day 3 hours ago
1 day 3 hours ago
1 day 4 hours ago
1 day 11 hours ago
1 day 12 hours ago
1 day 13 hours ago
1 day 17 hours ago
1 day 18 hours ago