3 Star 1 Fork 2

GO-ADMIN/go-admin-web

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

go-admin-web

介绍

go-admin-web 是 go-admin-server 项目的前端部分,采用 Vue3 + ElementPlus + Vite 技术栈,实现基于RBAC的权限管理,提供服务器性能监控、Web Shell、一键部署等功能。后端项目 go-admin-server。

项目源码

在线体验

安装教程

  1. 修改src/config-dev.js
     ws: { // websocket服务的访问地址,一般就是admin-web的访问地址,指示需要以ws或wss开头
         host: "wss://your-domain:your-port"
     }
  2. npm run build
  3. 构建好的静态文件(例如dist文件夹)拷贝到服务器上。
  4. 修改nginx配置
upstream go-admin-server {
    least_conn;
    server 【go-admin-server_host】:14040 weight=1 ;
}
map $http_upgrade $connection_upgrade {
    default upgrade;
    ''      close;
}
server {
    server_name 【your_own_domain】;
    listen 443 ssl http2;
    ssl_certificate 【public_key】;
    ssl_certificate_key 【private_key】;
    ssl_protocols TLSv1.2 TLSv1.3;
    location / {
        root /【your_custom_path】/dist;
        try_files $uri $uri/ /index.html;
    }
    location /bg-admin {
        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 X-Forwarded-Host $http_host;
        proxy_set_header X-Forwarded-Port $server_port;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_pass http://go-admin-server;
        rewrite ^\/bg-(.*)$ /$1 break;    # 根据需要决定是否重写url,这个示例把前端/bg-admin/xxx代理到后端/admin/xxx接口
    }
    location /bg-admin/terminal/ws {
        proxy_read_timeout 8h;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;
        proxy_set_header Sec-WebSocket-Key $http_sec_websocket_key;
        proxy_set_header Sec-WebSocket-Extensions $http_sec_websocket_extensions;
        proxy_set_header Sec-WebSocket-Accept $http_sec_websocket_accept;
        proxy_set_header Sec-WebSocket-Protocol $http_sec_websocket_protocol;
        proxy_set_header Sec-WebSocket-Version $http_sec_websocket_version;
        proxy_pass http://go-admin-server;
        rewrite ^\/bg-(.*)$ /$1 break;
    }
    location /bg-admin/sse {
        proxy_buffering off;
        keepalive_timeout 60s;
        proxy_pass http://go-admin-server;
        rewrite ^\/bg-(.*)$ /$1 break;
    }
    location /bg-admin/devops/app/upload {
        client_max_body_size 500m;
        client_body_buffer_size 2m;
        proxy_pass http://go-admin-server;
        rewrite ^\/bg-(.*)$ /$1 break;
    }
    location /bg-admin/devops/explorer/upload {
        client_max_body_size 1g;
        client_body_buffer_size 2m;
        proxy_pass http://go-admin-server;
        rewrite ^\/bg-(.*)$ /$1 break;
    }
}
  1. 启动nginx服务即可。
MIT License Copyright (c) 2024 KristenGe Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

go-admin-web是go-admin项目的前端程序,基于RBAC的权限模型,集成运维管理等功能,支持Web Shell、一键部署等,基于vue3 + element-plus + vite开发。 展开 收起
NodeJS 等 4 种语言
MIT
取消

发行版 (2)

全部

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
NodeJS
1
https://gitee.com/go-admin_1/go-admin-web.git
git@gitee.com:go-admin_1/go-admin-web.git
go-admin_1
go-admin-web
go-admin-web
master

搜索帮助

246c6175 1850385 950819b3 1850385