Featured Solutions: Apache
GeoTargeting your Content through Apache
Visiting a web site that reflects awareness of the location of the user by providing content that is relevant to their locale improves their experience and has been shown to reduce drop-off. Determining web content through redirection triggered by basic location data such as country, state or city can be done directly by the mod_quova Apache module.
mod_quova uses the Quova REST API to collect geolocation data for the client IP address and sets environment variables. The environment variables can be used by other modules, language interpreters or CGI programs.
Installation
mod_quova works with Apache version 2.x . The installation procedure make use of the “apxs” command that is typically available after installing the development package. To install download the mod_quova-1.0.0RC3.tar.gz file. Follow the instructions in the INSTALL.txt provided within the file.
Configuration
For a quick test, you can add the directive below to your httpd.conf, replacing the placeholders with your authentication credentials.
<IfModule quova_module>
QuovaEnabled on
QuovaApiAuth <YOUR_API_KEY> <YOUR_API_SECRET>
</IfModule>
Developer class credentials can be obtained directly from Quova’s developer portal. Subscription and Enterprise customers obtain their credentials directly from Quova. Contact your Quova Solutions engineer at support@quova.com if you do not already have credentials.
Once configured and after restarting Apache the new environment variables will be available as requests are processed. You can verify that all is working using e.g. phpinfo or Apache's default printenv cgi-bin, if available. You also need to make sure that you are using a publicly routable IP address when connecting to the server; otherwise no API call will be performed.
Please note that the above will enable the module for every request and it is NOT a recommended setting for a production server. Please refer to the README.txt included in the downloadable archive for more information on how to scale down the settings.
Usage
A typical configuration of mod_quova is to only enable geolocation when really necessary. This is highly recommended in order to limit the number of API calls issued so that they are only done when required. This ensures that no additional network traffic and undesired latency occurs for content that doesn't need geolocation, such as static files or scripts that have no use for it.