更新 README.md 文件,增加使用方法和配置说明,调整首页查看面板,隐藏登录按钮,支持面板与 nezha 容器分离部署。同时更新 GitHub Actions 配置,忽略 README.md 文件的变更。

This commit is contained in:
wood chen 2025-04-18 21:39:31 +08:00
parent b5bd645d3f
commit 3e2dc06b26
2 changed files with 37 additions and 7 deletions

View File

@ -3,7 +3,9 @@ name: Deploy to Server
on:
push:
branches:
- main # 或者你的主分支名称
- main
paths-ignore:
- 'README.md'
jobs:
build-and-deploy:

View File

@ -1,7 +1,35 @@
> [!CAUTION]
> 有关项目问题与意见请移步https://github.com/hamster1963/nezha-dash
> 交流
# nezha监控面板V1 版美化
> [!NOTE]
> 此项目为 nezha-dash 的官方实现,作为哪吒监控 V1 版本的默认前端,功能上可能与 nezha-dash 有所不同。
> https://github.com/hamster1963/nezha-dash
详见 <https://svr.czl.net>
1. 调整了首页的查看面板
2. 隐藏登录按钮
3. 可以把面板和nezha容器放到不同的服务器
## 使用方法
1. 下载, `npm install --force`, 然后打包 `npm run build`
2. 把打包后的文件放到网站根目录
3. 网站设置一个api反代, nginx配置大概如下:
```nginx
location ^~ /api {
proxy_pass http://部署面板的ip:端口;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
add_header X-Cache $upstream_cache_status;
add_header Cache-Control no-cache;
proxy_ssl_server_name off;
proxy_ssl_name $proxy_host;
add_header Strict-Transport-Security "max-age=31536000";
}
```
然后就可以了.