提交 46e7af05 编写于 作者: W Wu Jian Ping

优化文档

上级 e4a20a6f
...@@ -3,14 +3,24 @@ ...@@ -3,14 +3,24 @@
## 编译 ## 编译
```shell ```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 \ $ ./configure \
--prefix=$(PWD)/../build \
--add-module=$(PWD)/../ip2region/binding/nginx --add-module=$(PWD)/../ip2region/binding/nginx
$ make $ make
$ make install $ make install
``` ```
## Nginx 配置
> Syntax: `ip2region_db xdb_file_path` [cache_policy 可选];
> Context: http
cache_policy: `file` or `vectorIndex` or `content`, default: `content`
```nginx ```nginx
... ...
http { http {
...@@ -39,4 +49,8 @@ http { ...@@ -39,4 +49,8 @@ http {
``` ```
$ ./configure \
--prefix=$(PWD)/../build \
--add-module=$(PWD)/../ip2region/binding/nginx
Made with ♥ by Wu Jian Ping Made with ♥ by Wu Jian Ping
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册