nginx.conf 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. worker_processes auto;
  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 20m;
  11. # 启用动态压缩
  12. gzip on;
  13. gzip_types text/plain text/css application/json application/javascript text/xml;
  14. # 启用预压缩文件支持
  15. gzip_static on;
  16. # 允许解压(兼容不支持gzip的客户端)
  17. gunzip on;
  18. server {
  19. listen 8079;
  20. server_name 120.46.59.90;
  21. # ssl_certificate /home/nginx/html/yzbh/ssl/www.dljpwx.com.crt;
  22. # ssl_certificate_key /home/nginx/html/yzbh/ssl/www.dljpwx.com.key;
  23. # ssl_session_cache shared:SSL:1m;
  24. # ssl_ciphers HIGH:!aNULL:!MD5;
  25. # ssl_prefer_server_ciphers on;
  26. location / {
  27. root /home/nginx/html/yzbh/dist;
  28. try_files $uri $uri/ /index.html;
  29. index index.html index.htm;
  30. }
  31. # location /obs/ {
  32. # proxy_pass http://node472.com/;
  33. # }
  34. location /prod-api/{
  35. proxy_set_header Host $http_host;
  36. proxy_set_header X-Real-IP $remote_addr;
  37. proxy_set_header REMOTE-HOST $remote_addr;
  38. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  39. proxy_pass http://192.168.0.134:8040/;
  40. proxy_read_timeout 10m;
  41. proxy_cache off;
  42. }
  43. location /ezhizao-yzbh-sys/{
  44. proxy_set_header Host $http_host;
  45. proxy_set_header X-Real-IP $remote_addr;
  46. proxy_set_header REMOTE-HOST $remote_addr;
  47. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  48. proxy_pass http://192.168.0.134:8040/;
  49. proxy_read_timeout 10m;
  50. }
  51. location /ezhizao-yzbh-crm/{
  52. proxy_set_header Host $http_host;
  53. proxy_set_header X-Real-IP $remote_addr;
  54. proxy_set_header REMOTE-HOST $remote_addr;
  55. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  56. proxy_pass http://192.168.0.134:8041/;
  57. proxy_read_timeout 10m;
  58. }
  59. location /ezhizao-yzbh-entrust/{
  60. proxy_set_header Host $http_host;
  61. proxy_set_header X-Real-IP $remote_addr;
  62. proxy_set_header REMOTE-HOST $remote_addr;
  63. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  64. proxy_pass http://192.168.0.134:8042/;
  65. proxy_read_timeout 10m;
  66. }
  67. location /ezhizao-yzbh-production/{
  68. proxy_set_header Host $http_host;
  69. proxy_set_header X-Real-IP $remote_addr;
  70. proxy_set_header REMOTE-HOST $remote_addr;
  71. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  72. proxy_pass http://192.168.0.134:8043/;
  73. proxy_read_timeout 10m;
  74. }
  75. location /ezhizao-yzbh-finance/{
  76. proxy_set_header Host $http_host;
  77. proxy_set_header X-Real-IP $remote_addr;
  78. proxy_set_header REMOTE-HOST $remote_addr;
  79. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  80. proxy_pass http://192.168.0.134:8043/;
  81. proxy_read_timeout 10m;
  82. }
  83. location /ezhizao-yzbh-financial/{
  84. proxy_set_header Host $http_host;
  85. proxy_set_header X-Real-IP $remote_addr;
  86. proxy_set_header REMOTE-HOST $remote_addr;
  87. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  88. proxy_pass http://192.168.0.134:8044/;
  89. proxy_read_timeout 10m;
  90. }
  91. error_page 500 502 503 504 /50x.html;
  92. location = /50x.html {
  93. root html;
  94. }
  95. }
  96. }