wecom-dashboards/ruoyi-ui/nginx.conf

29 lines
719 B
Nginx Configuration File
Raw Permalink Normal View History

2026-02-08 08:22:43 +00:00
server {
listen 80;
server_name localhost;
# 前端静态文件路径
2026-02-09 19:26:46 +00:00
location / {
root /usr/share/nginx/html;
try_files $uri $uri/ /index.html;
2026-02-08 08:22:43 +00:00
index index.html;
}
# API 代理到后端
location /prod-api/ {
2026-02-08 08:22:43 +00:00
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;
proxy_connect_timeout 600;
proxy_read_timeout 600;
}
# 错误页面
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}