mirror of
https://github.com/Awuqing/BackupX.git
synced 2026-05-11 18:10:23 +08:00
- 新建 docs-site/ Docusaurus 项目,支持 en + zh-Hans 双语 - 从 README 迁移内容为独立文档页面: - Getting Started(安装、快速开始) - Deployment(Docker、裸机、Nginx、配置参考) - Features(备份类型、存储后端、SAP HANA、多节点集群、通知) - Reference(API、CLI) - Development(开发、贡献) - 自定义 BackupX 主题色、logo、落地页组件 - 新增 .github/workflows/docs.yml,Actions 自动构建并发布到 GitHub Pages - README.md 切换为英文,中文版挪到 README.zh-CN.md,两者均精简为导航型 - 配置站点 URL:https://awuqing.github.io/BackupX/
1.4 KiB
1.4 KiB
sidebar_position, title, description
| sidebar_position | title | description |
|---|---|---|
| 3 | Nginx 反向代理 | 通过 Nginx 发布 BackupX(HTTPS + SSE 友好的缓冲配置)。 |
Nginx 反向代理
生产环境可用的 Nginx 站点模板:
server {
listen 80;
server_name backup.example.com;
# 静态 UI(由 /opt/backupx/web 提供)
location / {
root /opt/backupx/web;
try_files $uri $uri/ /index.html;
}
# API 反向代理
location /api/ {
proxy_pass http://127.0.0.1:8340;
proxy_http_version 1.1;
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-Proto $scheme;
# 大文件上传(用于恢复流程)
client_max_body_size 0;
# 实时日志使用 SSE,必须关闭缓冲
proxy_buffering off;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
}
}
certbot 配置 HTTPS
sudo apt install certbot python3-certbot-nginx
sudo certbot --nginx -d backup.example.com
certbot 会自动改写配置监听 443 并设置续期。
:::caution Agent 需要稳定的 URL
如果 Master 部署在 HTTPS 后面,远程 Agent 的 --master 必须使用公网 HTTPS 地址。自签名证书需加 --insecure-tls(仅供测试)。
:::