enhance readme

This commit is contained in:
Wu Jian Ping 2023-03-31 00:28:13 +08:00
parent 09b05a6026
commit fed6788fe4
1 changed files with 12 additions and 0 deletions

View File

@ -22,6 +22,8 @@ $ make install
cache_policy: `file` or `vectorIndex` or `content`, default: `content` cache_policy: `file` or `vectorIndex` or `content`, default: `content`
Edit `nginx.conf` add `ip2region_db` directive
```nginx ```nginx
... ...
http { http {
@ -50,4 +52,14 @@ http {
``` ```
Copy `ip2region.xdb` to `nginx/config` folder, then restart nginx, the `region` data stored in `ip2region` variable
nginx access log sample
```log
{"remote_addr": "127.0.0.1", "region": "0|0|0|内网IP|内网IP", "http_x_forwarded_for": ""}
{"remote_addr": "127.0.0.1", "region": "0|0|0|内网IP|内网IP", "http_x_forwarded_for": ""}
```
Made with ♥ by Wu Jian Ping Made with ♥ by Wu Jian Ping