Commit Graph
9 Commits
Author SHA1 Message Date
Sergey KandaurovandNitin Swami 2b5c2b605b GeoIP: support for the MaxMind DB (MMDB) databases
The MaxMind DB format is now recognized, with the fallback to the
legacy format (reached End-of-Life in May 2022).  Migration requires
switching to MMDB database files:

    geoip_country  /usr/share/GeoIP/GeoLite2-Country.mmdb;
    geoip_city     /usr/share/GeoIP/GeoLite2-City.mmdb;
    geoip_org      /usr/share/GeoIP/GeoLite2-ASN.mmdb;

Either libmaxminddb or libGeoIP is sufficient to build the modules;
configure fails if neither is found.

Notes on the MMDB lookups:

*) $geoip_country_code3 and $geoip_city_country_code3 are converted from
   the alpha-2 codes with a compiled-in ISO 3166-1 table, as the MMDB
   databases provide alpha-2 codes only.

*) $geoip_org looks up "autonomous_system_organization", "isp",
   "organization", and "domain" in turn, to match the legacy ASNum, ISP,
   Org, and Domain database editions.

*) $geoip_area_code has no MMDB counterpart and is never found.

*) $geoip_region and $geoip_region_name come from subdivisions[0], and
   thus may differ in value from the legacy ones.

*) $geoip_dma_code comes from location.metro_code, which is deprecated
   by MaxMind and may be absent.

Co-authored-by: Nitin Swami <n.swami@f5.com>
2026-09-30 20:17:54 +04:00
Piotr Sikora 2deded362e Configure: added support for Homebrew on Apple Silicon.
Signed-off-by: Piotr Sikora <piotr@aviatrix.com>
2024-02-26 20:00:43 +00:00
Maxim Dounin 2c84f7af2c Configure: removed the --with-ipv6 option.
IPv6 now compiled-in automatically if support is found.  If there is a need
to disable it for some reason, --with-cc-opt="-DNGX_HAVE_INET6=0" can be used
for this.
2016-10-04 16:38:14 +03:00
Maxim Dounin 97f59dda09 Dynamic modules.
The auto/module script is extended to understand ngx_module_link=DYNAMIC.
When set, it links the module as a shared object rather than statically
into nginx binary.  The module can later be loaded using the "load_module"
directive.

New auto/module parameter ngx_module_order allows to define module loading
order in complex cases.  By default the order is set based on ngx_module_type.

3rd party modules can be compiled dynamically using the --add-dynamic-module
configure option, which will preset ngx_module_link to "DYNAMIC" before
calling the module config script.

Win32 support is rudimentary, and only works when using MinGW gcc (which
is able to handle exports/imports automatically).

In collaboration with Ruslan Ermilov.
2016-02-04 20:25:29 +03:00
Ruslan Ermilov db5e48d9b8 GeoIP: IPv6 support.
When using IPv6 databases, IPv4 addresses are looked up as IPv4-mapped
IPv6 addresses.

Mostly based on a patch by Gregor Kališnik (ticket #250).
2013-01-24 16:15:51 +00:00
Ruslan Ermilov 6aa684c3c3 Configure: fixed GeoIP library detection. 2013-01-24 16:15:07 +00:00
Ruslan Ermilov 9e334857a1 Configure: fixed style of include directories. 2013-01-24 16:14:12 +00:00
Maxim Konovalov f8d59e33f3 Copyright updated. 2012-01-18 15:07:43 +00:00
Igor Sysoev bc10147b9f ngx_http_geoip_module 2009-07-20 07:10:43 +00:00