The mod_geoip2 module embeds GeoIP database lookups into the Apache web server. It is only capable of looking up the IP of a client that connects to the web server, as opposed to looking up arbitrary addresses.
This module works with Apache 2. Please use mod_geoip with Apache 1.
Installation
You may download the latest release of mod_geoip2 or get the latest development version from GitHub. See the included INSTALL
file in the tarball for installation details.
Overview
The mod_geoip2 module uses the libGeoIP library to look up geolocation information for a client as part of the http request process. This module is free software, and is licensed under the Apache license.
To compile and install this module, you must first install libGeoIP 1.4.3 or newer.
The mod_geoip2 module takes effect either during request header parsing phase or the post read request phase, depending on whether it is configured for server-wide use or for a specific location/directory.
When enabled, the module looks at the incoming IP address and sets some variables which provide geolocation information for that IP. The variables it set depend on the specific GeoIP database being used (Country, City, ISP, etc.). These variables can be set in either the request notes table, the environment or both depending on the server configuration.
Lire la suite…
Quand votre nom de domaine pointe vers un hébergement mutualisé, vous n’avez, la plupart du temps, pas le droit de modifier les VirtualHost du serveur Apache.

Virtual Hosts
Pour pallier ce manque, une redirection s’impose mais par un autre biais: l’utilisation de l’URL Rewrting. Lire la suite…