Skip to content

Commit bd29624

Browse files
authored
Merge pull request #87 from yrluke/add_access_log
feat: add the how to save accesss log
2 parents 5c6f972 + 62160a5 commit bd29624

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed
303 KB
Loading

homepage/src/static/md/faq_other.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,24 @@ order: 10
1616
```shell
1717
docker exec -it safeline-mgt-api cleanlogs
1818
```
19+
20+
21+
### 如何记录所有访问雷池的请求
22+
默认情况下雷池是并不会保存请求记录的,如果需要保存请求记录,可以修改**resources/nginx/nginx.conf**
23+
![config_access_log.png](/images/docs/config_access_log.png)
24+
如图所示,去掉文件第99行的注释,删除第100行的内容,保存后运行命令检查配置文件
25+
```shell
26+
docker exec safeline-tengine nginx -t
27+
```
28+
检查应显示
29+
```shell
30+
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
31+
nginx: configuration file /etc/nginx/nginx.conf test is successful
32+
```
33+
最后应用配置文件
34+
```shell
35+
docker exec safeline-tengine nginx -s reload
36+
```
37+
配置生效后,访问日志将会保存至**logs/nginx**
38+
39+
***注意:该操作会会加快对硬盘的消耗,请定时清理访问日志***

0 commit comments

Comments
 (0)