All Projects → vislee → Ngx_http_ipdb_module

vislee / Ngx_http_ipdb_module

Licence: gpl-2.0
Another nginx http geoip module by ipdb

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Ngx http ipdb module

Nginx Autoinstall
Compile Nginx from source with custom modules on Debian and Ubuntu
Stars: ✭ 443 (+325.96%)
Mutual labels:  geoip, nginx
Docker Elastic Stack
ELK Stack Dockerfile
Stars: ✭ 175 (+68.27%)
Mutual labels:  geoip, nginx
Country Ip Blocks
CIDR country-level IP data, straight from the Regional Internet Registries, updated hourly.
Stars: ✭ 100 (-3.85%)
Mutual labels:  geoip, nginx
Ip2geo
Импортер ipgeo-данных в файлы, понятные для nginx geoip module, с поддержкой кодов регионов РФ.
Stars: ✭ 59 (-43.27%)
Mutual labels:  geoip, nginx
Nginx Haskell Module
Nginx module for binding Haskell code in configuration files for great good!
Stars: ✭ 99 (-4.81%)
Mutual labels:  nginx
Docker Nginx Php Mysql
Docker running Nginx, PHP-FPM, MySQL & PHPMyAdmin
Stars: ✭ 1,322 (+1171.15%)
Mutual labels:  nginx
Good Articles By Sort
本仓库用来存放我看过的认为比较好的文章---根据分类排序
Stars: ✭ 93 (-10.58%)
Mutual labels:  nginx
Docker Librenms
Docker image for LibreNMS
Stars: ✭ 91 (-12.5%)
Mutual labels:  nginx
Docker Gunicorn Nginx
An experimental docker setup for Python / Gunicorn / Nginx stack
Stars: ✭ 103 (-0.96%)
Mutual labels:  nginx
Nginx Vod Module
NGINX-based MP4 Repackager
Stars: ✭ 1,378 (+1225%)
Mutual labels:  nginx
Logation
Analyse your NGINX access logs and create beautiful maps of the locations from which people access your service.
Stars: ✭ 99 (-4.81%)
Mutual labels:  nginx
Nginx Openid Connect
Reference implementation of OpenID Connect integration for NGINX Plus
Stars: ✭ 96 (-7.69%)
Mutual labels:  nginx
Pilothouse
A command line app for managing a LEMP local development environment based on Docker.
Stars: ✭ 98 (-5.77%)
Mutual labels:  nginx
Ecs Nginx Proxy
Reverse proxy for AWS ECS. Lets you address your docker containers by sub domain.
Stars: ✭ 93 (-10.58%)
Mutual labels:  nginx
Production Ready Expressjs Server
Express.js server that implements production-ready error handling and logging following latest best practices.
Stars: ✭ 101 (-2.88%)
Mutual labels:  nginx
Shopware With Nginx
Running shopware using NGINX
Stars: ✭ 92 (-11.54%)
Mutual labels:  nginx
One Sys
聚合koa2+pm2+vue-cli+element+axios的前后端一体开发脚手架
Stars: ✭ 102 (-1.92%)
Mutual labels:  nginx
Python Microservice Fastapi
Learn to build your own microservice using Python and FastAPI
Stars: ✭ 96 (-7.69%)
Mutual labels:  nginx
Nginx Opencart
Nginx and PHP-FPM configuration for OpenCart install
Stars: ✭ 97 (-6.73%)
Mutual labels:  nginx
Craftcms Docker
Craft3/Craft2 CMS Docker base (Nginx, PHP-FPM 8, PostgreSQL/MariaDB, Redis)
Stars: ✭ 99 (-4.81%)
Mutual labels:  nginx

Name

travis-ci Coverage Status

ngx_http_ipdb_module - creates variables with values depending on the client IP address or specifies address, using the precompiled ipip.net ipdb.

Table of Contents

Status

The module is currently in active development.

Back to TOC

Install

# install json-c lib
# centos
yum install json-c-devel -y
#or mac OSX
brew install json-c

configure --prefix=/usr/local/nginx --add-module=./github.com/vislee/ngx_http_ipdb_module
# or dynamic compile
configure --prefix=/usr/local/nginx --add-dynamic-module=./github.com/vislee/ngx_http_ipdb_module --with-compat

The following information is success:

checking for json-c library ... found

+ ngx_http_ipdb_module was configured

Back to TOC

Example Configuration

# load_module ./modules/ngx_http_ipdb_module.so;

http {
    include       mime.types;
    default_type  application/octet-stream;

    ......

    ipdb /tmp/nginx/conf/ipiptest.ipdb;
    ipdb_language CN;
    ipdb_proxy 127.0.0.1;
    ipdb_proxy_recursive on;

    server {
        listen       8090;
        server_name  localhost;

        ......

        location / {
            # ipdb_specifies_addr $http_addr;
            # ipdb_language EN;

            return 200 "country_name:$ipdb_country_name, raw_info:$ipdb_raw";
        }
    }
}

Back to TOC

TODO

  • add variable

Back to TOC

Directives

ipdb

syntax: ipdb file;

default: -

context: http

Specifies a database.

ipdb_language

syntax: ipdb_language EN|CN;

default: EN

context: http,server,location

set variable language.

ipdb_proxy

syntax: ipdb_proxy address|CIDR;

default: -

context: http

Defines trusted addresses. Just like geoip_proxy.

ipdb_proxy_recursive

syntax: ipdb_proxy_recursive on|off;

default: off

context: http

Is recursive search. Just like geoip_proxy_recursive

ipdb_specifies_addr

syntax: ipdb_specifies_addr address;

default: -

context: http,server,location

Specifies the address. The address can contain text, variables.

Back to TOC

Variable

ipdb_country_name

$ipdb_country_name - country name, for example, "中国", "China"

ipdb_region_name

$ipdb_region_name - country region name, for example, "内蒙古","Nei Mongol", "北京", "Beijing"

ipdb_city_name

$ipdb_city_name - city name, for example, "呼和浩特", "Hohhot", "北京", "Beijing"

ipdb_owner_domain

ipdb_isp_domain

$ipdb_isp_domain - ISP name, for example, "电信", "ChinaTelecom"

ipdb_latitude

ipdb_longitude

ipdb_timezone

ipdb_utc_offset

ipdb_china_admin_code

ipdb_idd_code

ipdb_country_code

ipdb_continent_code

ipdb_idc

ipdb_base_station

ipdb_country_code3

ipdb_european_union

ipdb_currency_code

ipdb_currency_name

ipdb_anycast

ipdb_raw

$ipdb_raw - raw info, for example, "中国\t内蒙古\t呼和浩特","China\tNei Mongol\tHohhot"

NOTE: If you need to get multiple variables, use this $ipdb_raw.

Back to TOC

Author

wenqiang li(vislee)

Back to TOC

Copyright and License

This module is licensed under the GPL license.

Copyright (C) 2018-2019, by vislee.

All rights reserved.

Back to TOC

See Also

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].