nginx.bx.shanxiachem.com.conf 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. server {
  2. listen 80;
  3. server_name bx.shanxiachem.com;
  4. root /iflytek/bx/dist;
  5. index index.html;
  6. # 0 = disable body size check
  7. client_max_body_size 0;
  8. # Frontend SPA routing
  9. location / {
  10. try_files $uri $uri/ /index.html;
  11. }
  12. # Reimbursement backend API (FastAPI on 8011)
  13. location /api/ {
  14. client_max_body_size 0;
  15. proxy_pass http://121.43.228.102:8011;
  16. proxy_http_version 1.1;
  17. proxy_set_header Host $host;
  18. proxy_set_header X-Real-IP $remote_addr;
  19. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  20. proxy_set_header X-Forwarded-Proto $scheme;
  21. proxy_connect_timeout 60s;
  22. # 0 = disable timeout
  23. proxy_send_timeout 0;
  24. proxy_read_timeout 0;
  25. }
  26. # Cache static assets generated by Vite
  27. location ~* \.(js|css|png|jpg|jpeg|gif|svg|ico|webp|woff|woff2)$ {
  28. expires 30d;
  29. add_header Cache-Control "public, max-age=2592000, immutable";
  30. access_log off;
  31. }
  32. }