nginx.conf 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. server {
  2. listen 80;
  3. access_log /var/log/nginx/cwp-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 ^~ /anon/ {
  14. #proxy_pass http://web02:52011;
  15. proxy_pass http://cwp.sagacloud.cn;
  16. proxy_set_header Host $host;
  17. proxy_set_header X-Real-IP $remote_addr;
  18. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  19. client_max_body_size 20m;
  20. client_body_buffer_size 128k;
  21. proxy_buffers 32 4k;
  22. proxy_connect_timeout 3;
  23. proxy_send_timeout 30;
  24. proxy_read_timeout 30;
  25. }
  26. location ^~ /server/ {
  27. #proxy_pass http://web02:52011;
  28. proxy_pass http://cwp.sagacloud.cn;
  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. client_max_body_size 20m;
  33. client_body_buffer_size 128k;
  34. proxy_buffers 32 4k;
  35. proxy_connect_timeout 3;
  36. proxy_send_timeout 30;
  37. proxy_read_timeout 30;
  38. }
  39. location ^~ /duoduo-service/ {
  40. #proxy_pass http://web02:52011;
  41. proxy_pass http://cwp.sagacloud.cn;
  42. proxy_set_header Host $host;
  43. proxy_set_header X-Real-IP $remote_addr;
  44. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  45. client_max_body_size 20m;
  46. client_body_buffer_size 128k;
  47. proxy_buffers 32 4k;
  48. proxy_connect_timeout 3;
  49. proxy_send_timeout 30;
  50. proxy_read_timeout 30;
  51. }
  52. location ^~ /image-service/ {
  53. #proxy_pass http://172.17.11.172:8889;
  54. proxy_pass http://api.sagacloud.cn;
  55. proxy_set_header Host $host;
  56. proxy_set_header X-Real-IP $remote_addr;
  57. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  58. client_max_body_size 20m;
  59. client_body_buffer_size 128k;
  60. proxy_buffers 32 4k;
  61. proxy_connect_timeout 3;
  62. proxy_send_timeout 30;
  63. proxy_read_timeout 30;
  64. rewrite ^/image-service/(.*) /dp-auxiliary/image-service/$1 break;
  65. }
  66. location ^~ /graphy-service/ {
  67. proxy_pass http://api.sagacloud.cn;
  68. proxy_set_header Host $host;
  69. proxy_set_header X-Real-IP $remote_addr;
  70. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  71. client_max_body_size 20m;
  72. client_body_buffer_size 128k;
  73. proxy_buffers 32 4k;
  74. proxy_connect_timeout 3;
  75. proxy_send_timeout 30;
  76. proxy_read_timeout 30;
  77. rewrite ^/graphy-service/(.*) /du-auxiliary/image-service/$1 break;
  78. }
  79. }