default.conf 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. server {
  2. listen 80;
  3. server_name localhost;
  4. root /data/jnpfsoft/jnpf-web-vue3;
  5. index index.html;
  6. gzip on;
  7. gzip_static on;
  8. gzip_min_length 1k;
  9. gzip_comp_level 4;
  10. gzip_proxied any;
  11. gzip_types text/plain text/xml text/css;
  12. gzip_vary on;
  13. gzip_http_version 1.0;
  14. gzip_disable "MSIE [1-6]\.(?!.*SV1)";
  15. # JNPF-START
  16. # 设置上传文件的大小
  17. client_max_body_size 100m;
  18. # 添加头部信息
  19. proxy_set_header Host $http_host;
  20. proxy_set_header X-Real-IP $remote_addr;
  21. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  22. proxy_set_header X-Forwarded-Proto $scheme;
  23. proxy_set_header X-NginX-Proxy true;
  24. # This is necessary to pass the correct IP to be hashed
  25. real_ip_header X-Real-IP;
  26. proxy_connect_timeout 300;
  27. # 前端主项目伪静态
  28. location / {
  29. try_files $uri $uri/ /index.html;
  30. }
  31. # 大屏伪静态
  32. location /DataV {
  33. try_files $uri $uri/ /DataV/index.html;
  34. }
  35. # 报表伪静态
  36. location /Report/icons/{
  37. try_files $uri $uri/ /Report/icons/;
  38. }
  39. # 后端服务
  40. location /api/ {
  41. proxy_pass http://jnpf-java-boot-external.java-boot-v510:30000;
  42. }
  43. location /websocket {
  44. proxy_pass http://jnpf-java-boot-external.java-boot-v510:30000/api/message/websocket;
  45. proxy_http_version 1.1;
  46. proxy_set_header Upgrade $http_upgrade;
  47. proxy_set_header Connection "upgrade";
  48. proxy_read_timeout 600s;
  49. }
  50. # 报表
  51. location /ReportServer/ {
  52. proxy_pass http://jnpf-datareport-external.java-boot-v510:30007/;
  53. }
  54. # 文件预览
  55. location /FileServer {
  56. proxy_pass http://jnpf-file-preview-external.java-boot-v510:30090;
  57. }
  58. location ~ /FileServer/*.*\.(js|css)?$ {
  59. proxy_pass http://jnpf-file-preview-external.java-boot-v510:30090;
  60. }
  61. # 流程引擎
  62. location /api/Flow {
  63. proxy_pass http://jnpf-workflow-external.java-boot-v510:31000;
  64. }
  65. # univer报表
  66. location /api/Report {
  67. proxy_pass http://jnpf-java-datareport-univer-external.java-boot-v510:32000;
  68. }
  69. }