This commit is contained in:
Your Name
2026-07-17 09:24:47 +08:00
commit 530e7f839d
4353 changed files with 731879 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
# 抖音客服系统 - Nginx 反向代理示例(可选)
# 若已用 start_web.sh 单端口部署,可跳过 Nginx,直接访问 :8000
# 使用 Nginx 时建议将 KEFU_SERVE_WEB=false,由 Nginx 托管静态文件
upstream kefu_backend {
server 127.0.0.1:8000;
keepalive 32;
}
server {
listen 80;
server_name your.domain.com;
# 前端静态文件(npm run build 产物)
root /www/wwwroot/douyin/frontend/dist;
index index.html;
# API 转发到 FastAPI
location /api/ {
proxy_pass http://kefu_backend;
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;
proxy_read_timeout 300s;
}
# Swagger 文档(可选)
location ~ ^/(docs|redoc|openapi.json)$ {
proxy_pass http://kefu_backend;
proxy_set_header Host $host;
}
# SPAhash 路由只需返回 index.html
location / {
try_files $uri $uri/ /index.html;
}
}