[edit] geoip_city
| Syntax: |
geoip_city file |
| Default: |
|
| Context: |
http |
| Reference: |
geoip_city |
This directive specifies the full path to the Geo IP database .dat file that associates IP addresses with country, city and region geolocation information. This allows you to get that information corresponding to the given IP. It can be used to determine the visitor's geolocation from the IP address of the client. When set the following variables are available:
- $geoip_city_country_code — two-letter country code, for example, "RU", "US".
- $geoip_city_country_code3 — three-letter country code, for example, "RUS", "USA".
- $geoip_city_country_name — the name of the country, for example, "Russian Federation", "United States" — if available.
- $geoip_region — the name of region (province, region, state, province, federal land, and the like), for example, "Moscow City", "DC" — if available.
- $geoip_city — the name of the city, for example, "Moscow", "Washington", "Lisbon", &c — if available.
- $geoip_postal_code — zip code or postal code — if available.
- $geoip_city_continent_code — if available.
- $geoip_latitude — latitude — if available.
- $geoip_longitude — longitude — if available.
- $geoip_dma_code — DMA Code — if available.
- $geoip_area_code — Area Code — if available.
Module: HttpGeoipModule