nginx.http.conf 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. server {
  2. listen 80;
  3. listen [::]:80;
  4. server_name dskb.jianhengyiliao.com;
  5. root /opt/jianhen-voc/frontend/dist;
  6. index index.html;
  7. location = /index.html {
  8. add_header Cache-Control "no-store";
  9. try_files $uri =404;
  10. }
  11. location / {
  12. try_files $uri $uri/ /index.html;
  13. }
  14. location /api/ {
  15. proxy_pass http://127.0.0.1:3000/api/;
  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_set_header X-Request-Id $request_id;
  22. proxy_set_header X-External-Request 1;
  23. proxy_buffering off;
  24. proxy_read_timeout 600s;
  25. }
  26. location /parse/ {
  27. proxy_pass http://127.0.0.1:3000/parse/;
  28. proxy_http_version 1.1;
  29. proxy_set_header Host $host;
  30. proxy_set_header X-Real-IP $remote_addr;
  31. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  32. proxy_set_header X-Forwarded-Proto $scheme;
  33. }
  34. location = /health {
  35. proxy_pass http://127.0.0.1:3000/health;
  36. }
  37. location = /assets/runtime-config.json {
  38. add_header Cache-Control "no-store";
  39. try_files $uri =404;
  40. }
  41. }