From 3e2dc06b26a4532566a3ea7703e7f70ac37b315d Mon Sep 17 00:00:00 2001 From: wood chen Date: Fri, 18 Apr 2025 21:39:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20README.md=20=E6=96=87?= =?UTF-8?q?=E4=BB=B6=EF=BC=8C=E5=A2=9E=E5=8A=A0=E4=BD=BF=E7=94=A8=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E5=92=8C=E9=85=8D=E7=BD=AE=E8=AF=B4=E6=98=8E=EF=BC=8C?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=A6=96=E9=A1=B5=E6=9F=A5=E7=9C=8B=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=EF=BC=8C=E9=9A=90=E8=97=8F=E7=99=BB=E5=BD=95=E6=8C=89?= =?UTF-8?q?=E9=92=AE=EF=BC=8C=E6=94=AF=E6=8C=81=E9=9D=A2=E6=9D=BF=E4=B8=8E?= =?UTF-8?q?=20nezha=20=E5=AE=B9=E5=99=A8=E5=88=86=E7=A6=BB=E9=83=A8?= =?UTF-8?q?=E7=BD=B2=E3=80=82=E5=90=8C=E6=97=B6=E6=9B=B4=E6=96=B0=20GitHub?= =?UTF-8?q?=20Actions=20=E9=85=8D=E7=BD=AE=EF=BC=8C=E5=BF=BD=E7=95=A5=20RE?= =?UTF-8?q?ADME.md=20=E6=96=87=E4=BB=B6=E7=9A=84=E5=8F=98=E6=9B=B4?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 4 +++- README.md | 40 ++++++++++++++++++++++++++++++------ 2 files changed, 37 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e5bbbcd..f77e5a7 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -3,7 +3,9 @@ name: Deploy to Server on: push: branches: - - main # 或者你的主分支名称 + - main + paths-ignore: + - 'README.md' jobs: build-and-deploy: diff --git a/README.md b/README.md index 2b30485..1b443ec 100644 --- a/README.md +++ b/README.md @@ -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 +详见 + +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"; +} +``` + + +然后就可以了.