Files
huihuiSquare/frontend/nginx.conf
2026-07-24 14:04:21 +08:00

25 lines
609 B
Nginx Configuration File

server {
listen 80;
server_name _;
client_max_body_size 10m;
root /usr/share/nginx/html;
index index.html;
# Vue Router history mode
location / {
try_files $uri $uri/ /index.html;
}
# API proxy to backend
location /api/ {
proxy_pass http://ai-virtual-backend:8000;
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_read_timeout 120s;
}
gzip on;
gzip_types text/plain text/css application/json application/javascript;
}