Project closed
Article

Use of the database in nginx

Configuration and use of the database (CIDR) are very practical and comfortable in nginx, so there is no problem to install it.

Nginx must be compiled with module ngx_http_geo_module (by default).
Paste in http
    geo  $geo {
            include  worldip.conf;
            default  XX;
    }
The variable $geo can also be used in log_format.
This variable gets passed through FastCGI to your backend:
fastcgi_param HTTP_GEO $geo;
or
fastcgi_param GEO $geo;
If nginx runs as a proxy (e.g. in conjunction with Apache), you need only add
proxy_set_header   HTTP_GEO             $geo;