				mod_geoip 1.2.0
				---------------

======== OVERVIEW =========

mod_geoip is an Apache module for finding the country that a web request
originated from.  It uses the GeoIP library and database to perform
the lookup.  It is free software, licensed under the Apache license.

======== USAGE ============

To use, see the instructions in INSTALL on how to install the module,
then make sure that

  GeoIPEnable On

is set in your Apache configuration file.

If you want to specify the a non-default location for the database file,
use

  GeoIPDBFile /path/to/GeoIP.dat

GeoIP Country Edition:
You can retrieve the ISO 3166 Country code from the Apache notes table
under the "GEOIP_COUNTRY_CODE" key, or from the environment variable
"GEOIP_COUNTRY_CODE".  It also sets the GEOIP_COUNTRY_NAME note and
environment variable.

GeoIP Region Edition:
Sets GEOIP_COUNTRY_CODE and GEOIP_REGION

GeoIP City Edition:
Sets GEOIP_COUNTRY_CODE, GEOIP_REGION, and GEOIP_CITY.

By default it sets both the notes table and environment variable.
For performance reasons you may want to only set the one you use, to
do so use the "GeoIPOutput" configuration directive:

  GeoIPOutput Notes   # Sets Apache notes table only
  GeoIPOutput Env     # Sets Environmental Variable only
  GeoIPOutput All     # Sets both (current default behaviour)

By default it uses GEOIP_STANDARD mode, which does not perform
any memory caching (it is the most memory efficient).  To turn
on memory caching (warning can be memory intensive since
it is used across all Apache children) use:

  GeoIPFlags MemoryCache

========= redirection with mod_geoip and mod_rewrite ========

Below is an example of how to do redirection with mod_geoip and
mod_rewrite:

GeoIPEnable On
GeoIPDBFile /path/to/GeoIP.dat

RewriteEngine on
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^CA$
RewriteRule ^(.*)$ http://www.canada.com [L]

========= notes ===========

We have received feedback that suexec cleans environment variables that
it deems to be unsafe, including the variables mod_geoip sets.  One workaround
is to modify mod_geoip.c to set HTTP_GEOIP_COUNTRY_CODE and HTTP_GEOIP_COUNTRY_NAME
instead of GEOIP_COUNTRY_CODE and GEOIP_COUNTRY_NAME.  We would like to handle
this more cleanly, comments welcome.

========= contact =========

Please send any comments or suggestions to support@maxmind.com
