nginx.conf 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. worker_processes 1;
  2. events {
  3. worker_connections 1024;
  4. }
  5. http {
  6. include mime.types;
  7. default_type application/octet-stream;
  8. sendfile on;
  9. keepalive_timeout 65;
  10. client_max_body_size 50m;
  11. proxy_cache_path /home/nginx/html/cache levels=1:2 keys_zone=mycache:500m inactive=1d max_size=10g;
  12. proxy_temp_path /home/nginx/html/cache/proxy_temp;
  13. server {
  14. listen 80;
  15. server_name 124.70.62.143;
  16. proxy_cache mycache;
  17. # ssl_certificate /home/nginx/html/yzbh/ssl/www.dljpwx.com.crt;
  18. # ssl_certificate_key /home/nginx/html/yzbh/ssl/www.dljpwx.com.key;
  19. # ssl_session_cache shared:SSL:1m;
  20. # ssl_ciphers HIGH:!aNULL:!MD5;
  21. # ssl_prefer_server_ciphers on;
  22. location / {
  23. root /home/nginx/html/yzbh/dist;
  24. try_files $uri $uri/ /index.html;
  25. index index.html index.htm;
  26. }
  27. # location /obs/ {
  28. # proxy_pass http://node472.com/;
  29. # }
  30. location /prod-api/{
  31. proxy_set_header Host $http_host;
  32. proxy_set_header X-Real-IP $remote_addr;
  33. proxy_set_header REMOTE-HOST $remote_addr;
  34. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  35. proxy_pass http://172.18.0.1:8040/;
  36. proxy_read_timeout 10m;
  37. proxy_cache off;
  38. }
  39. location /ezhizao-yzbh-sys/{
  40. proxy_set_header Host $http_host;
  41. proxy_set_header X-Real-IP $remote_addr;
  42. proxy_set_header REMOTE-HOST $remote_addr;
  43. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  44. proxy_pass http://172.18.0.1:8040/;
  45. proxy_read_timeout 10m;
  46. }
  47. location /ezhizao-yzbh-crm/{
  48. proxy_set_header Host $http_host;
  49. proxy_set_header X-Real-IP $remote_addr;
  50. proxy_set_header REMOTE-HOST $remote_addr;
  51. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  52. proxy_pass http://172.18.0.1:8041/;
  53. proxy_read_timeout 10m;
  54. }
  55. location /ezhizao-yzbh-entrust/{
  56. proxy_set_header Host $http_host;
  57. proxy_set_header X-Real-IP $remote_addr;
  58. proxy_set_header REMOTE-HOST $remote_addr;
  59. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  60. proxy_pass http://172.18.0.1:8042/;
  61. proxy_read_timeout 10m;
  62. }
  63. location /ezhizao-yzbh-production/{
  64. proxy_set_header Host $http_host;
  65. proxy_set_header X-Real-IP $remote_addr;
  66. proxy_set_header REMOTE-HOST $remote_addr;
  67. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  68. proxy_pass http://172.18.0.1:8043/;
  69. proxy_read_timeout 10m;
  70. }
  71. location /ezhizao-yzbh-finance/{
  72. proxy_set_header Host $http_host;
  73. proxy_set_header X-Real-IP $remote_addr;
  74. proxy_set_header REMOTE-HOST $remote_addr;
  75. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  76. proxy_pass http://172.18.0.1:8043/;
  77. proxy_read_timeout 10m;
  78. }
  79. location /ezhizao-yzbh-financial/{
  80. proxy_set_header Host $http_host;
  81. proxy_set_header X-Real-IP $remote_addr;
  82. proxy_set_header REMOTE-HOST $remote_addr;
  83. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  84. proxy_pass http://172.18.0.1:8044/;
  85. proxy_read_timeout 10m;
  86. }
  87. error_page 500 502 503 504 /50x.html;
  88. location = /50x.html {
  89. root html;
  90. }
  91. }
  92. }