nginx.conf 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. server {
  2. listen 80;
  3. access_log /var/log/nginx/review-pages.log main;
  4. root /opt/sagacloud/app/dist;
  5. index index.html;
  6. location / {
  7. try_files $uri $uri/ @router;
  8. index index.html;
  9. }
  10. location @router {
  11. rewrite ^.*$ /index.html last;
  12. }
  13. location ^~ /duoduo-service/ {
  14. proxy_pass http://review.sagacloud.cn;
  15. proxy_set_header Host $host;
  16. proxy_set_header X-Real-IP $remote_addr;
  17. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  18. client_max_body_size 20m;
  19. client_body_buffer_size 128k;
  20. proxy_buffers 32 4k;
  21. proxy_connect_timeout 3;
  22. proxy_send_timeout 30;
  23. proxy_read_timeout 30;
  24. #rewrite ^/duoduo-service/(.*) /$1 break;
  25. }
  26. location ^~ /server/ {
  27. proxy_pass http://review.sagacloud.cn;
  28. proxy_set_header Host $host;
  29. proxy_set_header X-Real-IP $remote_addr;
  30. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  31. client_max_body_size 20m;
  32. client_body_buffer_size 128k;
  33. proxy_buffers 32 4k;
  34. proxy_connect_timeout 3;
  35. proxy_send_timeout 30;
  36. proxy_read_timeout 30;
  37. rewrite ^/server/(.*) /$1 break;
  38. }
  39. }