nginx.conf 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  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. # upstream websocket_backend {
  12. # server websocket_server_address:port; # 替换为你的 WebSocket 服务器地址和端口
  13. # }
  14. server {
  15. listen 88;
  16. server_name 120.46.159.163;
  17. # ssl_certificate /home/nginx/html/dms/ssl/www.dljpwx.com.crt;
  18. # ssl_certificate_key /home/nginx/html/dms/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/dms/app;
  24. try_files $uri $uri/ /index.html;
  25. index index.html index.htm;
  26. }
  27. location /ezhizao-dms-sys/{
  28. proxy_set_header Host $http_host;
  29. proxy_set_header X-Real-IP $remote_addr;
  30. proxy_set_header REMOTE-HOST $remote_addr;
  31. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  32. proxy_pass http://120.46.159.163:7001/;
  33. }
  34. location /ezhizao-dms-p2/{
  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://120.46.159.163:7002/;
  40. }
  41. location /ezhizao-dms-production/{
  42. proxy_set_header Host $http_host;
  43. proxy_set_header X-Real-IP $remote_addr;
  44. proxy_set_header REMOTE-HOST $remote_addr;
  45. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  46. proxy_pass http://120.46.159.163:7003/;
  47. }
  48. location /ezhizao-dms-app/{
  49. proxy_set_header Host $http_host;
  50. proxy_set_header X-Real-IP $remote_addr;
  51. proxy_set_header REMOTE-HOST $remote_addr;
  52. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  53. proxy_pass http://120.46.159.163:7004/;
  54. }
  55. location /ws/{
  56. proxy_http_version 1.1;
  57. proxy_set_header Upgrade $http_upgrade;
  58. proxy_set_header Connection "Upgrade";
  59. proxy_set_header Host $host;
  60. proxy_set_header X-Real-IP $remote_addr;
  61. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  62. proxy_set_header X-Forwarded-Proto $scheme;
  63. proxy_pass http://120.46.159.163:7001/ws/;
  64. }
  65. location /ws-production/ {
  66. proxy_http_version 1.1;
  67. proxy_set_header Upgrade $http_upgrade;
  68. proxy_set_header Connection "Upgrade";
  69. proxy_set_header Host $host;
  70. proxy_set_header X-Real-IP $remote_addr;
  71. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  72. proxy_set_header X-Forwarded-Proto $scheme;
  73. proxy_pass http://120.46.159.163:7003/wsExport/;
  74. }
  75. error_page 500 502 503 504 /50x.html;
  76. location = /50x.html {
  77. root html;
  78. }
  79. }
  80. # 德迈仕H5
  81. server {
  82. listen 443 ssl;
  83. server_name 120.46.159.163;
  84. ssl_certificate /home/nginx/html/dms/ssl/dms120.crt;
  85. ssl_certificate_key /home/nginx/html/dms/ssl/dms120.key;
  86. ssl_session_cache shared:SSL:1m;
  87. ssl_ciphers HIGH:!aNULL:!MD5;
  88. ssl_prefer_server_ciphers on;
  89. location / {
  90. root /home/nginx/html/dms/app;
  91. try_files $uri $uri/ /index.html;
  92. index index.html index.htm;
  93. }
  94. location /ezhizao-dms-sys/{
  95. proxy_set_header Host $http_host;
  96. proxy_set_header X-Real-IP $remote_addr;
  97. proxy_set_header REMOTE-HOST $remote_addr;
  98. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  99. proxy_pass http://120.46.159.163:7001/;
  100. }
  101. location /prod-api/{
  102. proxy_set_header Host $http_host;
  103. proxy_set_header X-Real-IP $remote_addr;
  104. proxy_set_header REMOTE-HOST $remote_addr;
  105. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  106. proxy_pass http://120.46.159.163:7004/;
  107. }
  108. location /ezhizao-dms-production/{
  109. proxy_set_header Host $http_host;
  110. proxy_set_header X-Real-IP $remote_addr;
  111. proxy_set_header REMOTE-HOST $remote_addr;
  112. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  113. proxy_pass http://120.46.159.163:7003/;
  114. }
  115. location /ezhizao-dms-p2/{
  116. proxy_set_header Host $http_host;
  117. proxy_set_header X-Real-IP $remote_addr;
  118. proxy_set_header REMOTE-HOST $remote_addr;
  119. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  120. proxy_pass http://120.46.159.163:7002/;
  121. }
  122. error_page 500 502 503 504 /50x.html;
  123. location = /50x.html {
  124. root html;
  125. }
  126. }
  127. server {
  128. listen 80;
  129. server_name 120.46.159.163;
  130. # ssl_certificate /home/nginx/html/dms/ssl/www.dljpwx.com.crt;
  131. # ssl_certificate_key /home/nginx/html/dms/ssl/www.dljpwx.com.key;
  132. # ssl_session_cache shared:SSL:1m;
  133. # ssl_ciphers HIGH:!aNULL:!MD5;
  134. # ssl_prefer_server_ciphers on;
  135. location / {
  136. root /home/nginx/html/dms/dist;
  137. try_files $uri $uri/ /index.html;
  138. index index.html index.htm;
  139. }
  140. location /ezhizao-dms-sys/{
  141. proxy_set_header Host $http_host;
  142. proxy_set_header X-Real-IP $remote_addr;
  143. proxy_set_header REMOTE-HOST $remote_addr;
  144. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  145. proxy_pass http://120.46.159.163:7001/;
  146. }
  147. location /ezhizao-dms-p2/{
  148. proxy_set_header Host $http_host;
  149. proxy_set_header X-Real-IP $remote_addr;
  150. proxy_set_header REMOTE-HOST $remote_addr;
  151. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  152. proxy_pass http://120.46.159.163:7002/;
  153. }
  154. location /ezhizao-dms-production/{
  155. proxy_set_header Host $http_host;
  156. proxy_set_header X-Real-IP $remote_addr;
  157. proxy_set_header REMOTE-HOST $remote_addr;
  158. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  159. proxy_pass http://120.46.159.163:7003/;
  160. }
  161. location /ezhizao-dms-app/{
  162. proxy_set_header Host $http_host;
  163. proxy_set_header X-Real-IP $remote_addr;
  164. proxy_set_header REMOTE-HOST $remote_addr;
  165. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  166. proxy_pass http://120.46.159.163:7004/;
  167. }
  168. error_page 500 502 503 504 /50x.html;
  169. location = /50x.html {
  170. root html;
  171. }
  172. }
  173. }