nginx.bx.shanxiachem.com.conf 906 B

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