提交 2c53083a 编写于 作者: W Wu Jian Ping

优化文档

上级 46e7af05
# nginx-ip2region # nginx-ip2region
## 编译 ## Build
```shell ```shell
$ mkdir ip2region $ mkdir -p workspace
$ cd workspace
$ wget https://nginx.org/download/nginx-1.23.4.tar.gz $ 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 $ tar -zxf nginx-1.23.4.tar.gz && rm -rf nginx-1.23.4.tar.gz
$ git clone https://github.com/lionsoul2014/ip2region.git $ git clone https://github.com/lionsoul2014/ip2region.git
...@@ -14,9 +15,9 @@ $ make ...@@ -14,9 +15,9 @@ $ make
$ make install $ make install
``` ```
## Nginx 配置 ## Nginx conf
> Syntax: `ip2region_db xdb_file_path` [cache_policy 可选]; > Syntax: `ip2region_db xdb_file_path [cache_policy 可选]`;
> Context: http > Context: http
cache_policy: `file` or `vectorIndex` or `content`, default: `content` cache_policy: `file` or `vectorIndex` or `content`, default: `content`
...@@ -33,7 +34,7 @@ http { ...@@ -33,7 +34,7 @@ http {
access_log logs/access.log main; access_log logs/access.log main;
# 设置xdb文件路径 # set xdb file path
ip2region_db ip2region.xdb; ip2region_db ip2region.xdb;
server { server {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册