优化文档

This commit is contained in:
Wu Jian Ping
2023-03-30 22:08:49 +08:00
parent d96d54bbaa
commit 0bc0d9ea87
+16 -2
View File
@@ -3,14 +3,24 @@
## 编译
```shell
$ mkdir ip2region
$ wget https://nginx.org/download/nginx-1.23.4.tar.gz
$ tar -zxf nginx-1.23.4.tar.gz && rm -rf nginx-1.23.4.tar.gz
$ git clone https://github.com/lionsoul2014/ip2region.git
$ cd nginx-1.23.4
$ ./configure \
--prefix=$(PWD)/../build \
--add-module=$(PWD)/../ip2region/binding/nginx
$ make
$ make install
```
## Nginx 配置
> Syntax: `ip2region_db xdb_file_path` [cache_policy 可选];
> Context: http
cache_policy: `file` or `vectorIndex` or `content`, default: `content`
```nginx
...
http {
@@ -39,4 +49,8 @@ http {
```
$ ./configure \
--prefix=$(PWD)/../build \
--add-module=$(PWD)/../ip2region/binding/nginx
Made with ♥ by Wu Jian Ping