First you need to make sure you have apache2 server installed and working fine.
Installing mod_geoip in Debian etch using the following command
#aptitude install libapache2-mod-geoip
This will complete the installation
Now you need to open /etc/apache2/mods-available/geoip.conf file and uncomment the GeoIPDBFile line so that the file looks as follows
Now you need to restart Apache using the following command
To see if mod_geoip is working correctly, we can create a small PHP file in one of our web spaces (e.g. /var/www):
add the following lines and save the file
open browser http://serverip/geoiptest.php, and it should display your country.