Update README.md
This commit is contained in:
parent
1c15cd710b
commit
e39fdd7bf8
1 changed files with 11 additions and 1 deletions
12
README.md
12
README.md
|
@ -1,7 +1,9 @@
|
|||
Description
|
||||
===========
|
||||
|
||||
**ngx_http_geoip2_module** - creates variables with values from the maxmind geoip2 databases based on the client IP (supports both IPv4 and IPv6)
|
||||
**ngx_http_geoip2_module** - creates variables with values from the maxmind geoip2 databases based on the client IP (default) or from a specific variable (supports both IPv4 and IPv6)
|
||||
|
||||
The module now supports nginx streams and can be used in the same way the http module can be used.
|
||||
|
||||
## Installing
|
||||
First install [libmaxminddb](https://github.com/maxmind/libmaxminddb) as described in its [README.md
|
||||
|
@ -60,6 +62,14 @@ http {
|
|||
fastcgi_param CITY_NAME $geoip2_data_city_name;
|
||||
....
|
||||
}
|
||||
|
||||
stream {
|
||||
...
|
||||
geoip2 /etc/maxmind-country.mmdb {
|
||||
$geoip2_data_country_code default=US source=$remote_addr country iso_code;
|
||||
}
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
To find the path of the data you want (eg: city names en), use the [mmdblookup tool](https://maxmind.github.io/libmaxminddb/mmdblookup.html):
|
||||
|
|
Loading…
Reference in a new issue