rag-frontend/nginx.conf
向宁 e75e364e64 fix: change nginx listen port from 80 to 8080
Port 80 conflicts with another service on NUC Box
2026-05-17 20:19:21 +08:00

27 lines
693 B
Nginx Configuration File

server {
listen 8080;
server_name _;
root /usr/share/nginx/html;
index index.html;
# SPA fallback
location / {
try_files $uri $uri/ /index.html;
}
# Proxy API requests to rag-backend
location /api/ {
proxy_pass http://192.168.1.154:5211/api/;
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;
}
# Static file caching
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
expires 1y;
add_header Cache-Control "public, immutable";
}
}