Files
2026-04-23 09:58:47 +08:00

64 lines
2.0 KiB
Nginx Configuration File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

upstream compliance_backend {
server compliance-backend:8000;
keepalive 32;
}
# 文件上传大小限制法规PDF可能较大
client_max_body_size 100M;
server {
listen 80;
server_name _;
# 访问日志
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
# 超时配置LLM推理可能较慢
proxy_connect_timeout 60s;
proxy_send_timeout 300s;
proxy_read_timeout 300s;
# 通用代理头
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_http_version 1.1;
proxy_set_header Connection "";
# ── 知识库接口 ─────────────────────────────
location /api/kb/ {
proxy_pass http://compliance_backend/api/kb/;
}
# ── 合规审查接口 ───────────────────────────
location /api/compliance/ {
proxy_pass http://compliance_backend/api/compliance/;
}
# ── 法规监控接口 ───────────────────────────
location /api/regulation/ {
proxy_pass http://compliance_backend/api/regulation/;
}
# ── 健康检查 ───────────────────────────────
location /health {
proxy_pass http://compliance_backend/health;
}
# ── API 文档(开发环境)────────────────────
location /docs {
proxy_pass http://compliance_backend/docs;
}
location /openapi.json {
proxy_pass http://compliance_backend/openapi.json;
}
# ── 根路径 ─────────────────────────────────
location / {
proxy_pass http://compliance_backend/;
}
}