doc: update docs/nginx.md (#836)

This commit is contained in:
jaywcjlove 2024-10-11 16:56:19 +08:00
parent b6d62f4f74
commit f6fe236778

View File

@ -897,26 +897,26 @@ location = /robots.txt {
```nginx ```nginx
server { server {
listen 80; listen 80;
server_name xxx.top; server_name xxx.top;
location / { location / {
access_log /data/logs/nginx/json_ip.log json; access_log /data/logs/nginx/json_ip.log json;
proxy_set_header Host $http_host; proxy_set_header Host $http_host;
proxy_set_header X-Real-Ip $remote_addr; proxy_set_header X-Real-Ip $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:9999; proxy_pass http://127.0.0.1:9999;
} }
} }
server { server {
listen 9999; listen 9999;
location / { location / {
access_log off; access_log off;
default_type application/json; default_type application/json;
return 200 "{\"ip\":\"$http_X_Real_Ip\"}"; return 200 "{\"ip\":\"$http_X_Real_Ip\"}";
} }
} }
``` ```
@ -973,6 +973,7 @@ server {
} }
} }
```
### 流量镜像配置 ### 流量镜像配置
<!--rehype:wrap-class=col-span-3--> <!--rehype:wrap-class=col-span-3-->