springAiDemo_frontend/nginx.conf
kennethcheng 74d8e37abd feat: 初始化 Apache Doris 智能问答系统前端
- 基于 Vue 3 + TypeScript + Vite 构建
- 实现 RAG 智能问答聊天界面,支持流式响应
- 支持 PDF 文档上传(最大 30MB)和解析
- 集成 marked + highlight.js 实现 Markdown 渲染与代码高亮
- 使用 Element Plus 构建 UI 组件
- 支持暗黑/明亮主题切换
- 配置 Docker + Nginx 多阶段构建
2026-04-20 03:23:34 +08:00

31 lines
862 B
Nginx Configuration File

server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
# Gzip 压缩
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
# SPA 路由支持
location / {
try_files $uri $uri/ /index.html;
}
# 静态资源缓存
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
expires 1y;
add_header Cache-Control "public, immutable";
}
# API 代理(可选)
# location /api {
# proxy_pass http://backend:8080;
# 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;
# }
}