default 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. server {
  2. listen 80;
  3. server_name 121.40.93.243; #改成对应的HOST
  4. root /usr/share/nginx/html;
  5. #charset koi8-r;
  6. client_max_body_size 100m;
  7. #access_log logs/host.access.log main;
  8. # 开启代理缓冲区
  9. proxy_buffering on;
  10. # 响应头的缓冲区
  11. proxy_buffer_size 128k;
  12. # 网页内容缓冲区的个数为4,单个大小为1M
  13. proxy_buffers 8 1M;
  14. proxy_busy_buffers_size 2M;
  15. location / {
  16. root /usr/share/nginx/html;
  17. }
  18. location /api {
  19. proxy_pass http://crowd-backend-api;
  20. }
  21. location /page {
  22. proxy_pass http://crowd-user-api;
  23. }
  24. location ~ ^/(js|vendor|css|fonts|images)/.*$ {
  25. proxy_pass http://crowd-user-api;
  26. }
  27. location /var {
  28. root /;
  29. index index.html index.htm;
  30. }
  31. location /recommendationtest {
  32. proxy_pass http://59.42.10.54:7477;
  33. }
  34. #error_page 404 /404.html;
  35. # redirect server error pages to the static page /50x.html
  36. #
  37. error_page 500 502 503 504 /50x.html;
  38. location = /50x.html {
  39. root html;
  40. }
  41. }