@@ -128,6 +128,15 @@ ServerStatus-web 主题由 [@mjjrock](https://github.com/mjjrock) 修改提供
128
128
129
129
</details >
130
130
131
+ <details >
132
+ <summary >ServerStatus-nezha 主题</summary >
133
+
134
+ ServerStatus-nezha 主题由 [ @snowie2000 ] ( https://github.com/snowie2000 ) 修改提供,类似于哪吒探针v1,[ 主题地址] ( https://github.com/snowie2000/serverstatus-nezha-theme )
135
+
136
+ <img width =" 1425 " alt =" image " src =" https://github.com/user-attachments/assets/2f0a9ca1-0d7d-472c-bf0d-eada396f6219 " >
137
+
138
+ </details >
139
+
131
140
132
141
<details >
133
142
<summary >v1.5.7 版本主题</summary >
@@ -481,34 +490,25 @@ python3 stat_client.py -a "http://127.0.0.1:8080/report" -u h1 -p p1 -n
481
490
server {
482
491
# ssl, domain 等其它 nginx 配置
483
492
484
- # 反代 /report 请求
485
- location = /report {
486
- proxy_set_header Host $host;
487
- proxy_set_header X-Real-IP $remote_addr;
488
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
489
- proxy_set_header X-Forwarded-Proto $scheme;
490
- proxy_set_header X-Forwarded-Host $host;
491
- proxy_set_header X-Forwarded-Port $server_port;
492
-
493
- proxy_pass http://127.0.0.1:8080/report;
494
- }
495
- # 反代 json 数据请求
496
- location = /json/stats.json {
493
+ # 自动反代所有请求
494
+ location @proxy {
497
495
proxy_set_header Host $host;
498
496
proxy_set_header X-Real-IP $remote_addr;
499
497
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
500
498
proxy_set_header X-Forwarded-Proto $scheme;
501
499
proxy_set_header X-Forwarded-Host $host;
502
500
proxy_set_header X-Forwarded-Port $server_port;
501
+ proxy_set_header Upgrade $http_upgrade;
502
+ proxy_set_header Connection $http_connection;
503
503
504
- proxy_pass http://127.0.0.1:8080/json/stats.json ;
504
+ proxy_pass http://127.0.0.1:8080;
505
505
}
506
- # v1.4.0后,同样需要反代 /detail, /map
507
506
508
- # 其它 html,js,css 等,走本地文本
507
+ # 如果主题存在相关文件则使用,否则回退到上游
509
508
location / {
510
509
root /opt/ServerStatus/web; # 你自己修改的主题目录
511
510
index index.html index.htm;
511
+ try_files $uri $uri/ @proxy;
512
512
}
513
513
}
514
514
```
0 commit comments