nginx.conf 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  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 /ezhizao-dms-jd/{
  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://120.46.159.163:7006/;
  61. }
  62. error_page 500 502 503 504 /50x.html;
  63. location = /50x.html {
  64. root html;
  65. }
  66. }
  67. # 德迈仕H5
  68. server {
  69. listen 443 ssl;
  70. server_name 120.46.159.163;
  71. ssl_certificate /home/nginx/html/dms/ssl/dms120.crt;
  72. ssl_certificate_key /home/nginx/html/dms/ssl/dms120.key;
  73. ssl_session_cache shared:SSL:1m;
  74. ssl_ciphers HIGH:!aNULL:!MD5;
  75. ssl_prefer_server_ciphers on;
  76. location / {
  77. root /home/nginx/html/dms/app;
  78. try_files $uri $uri/ /index.html;
  79. index index.html index.htm;
  80. }
  81. location /ezhizao-dms-sys/{
  82. proxy_set_header Host $http_host;
  83. proxy_set_header X-Real-IP $remote_addr;
  84. proxy_set_header REMOTE-HOST $remote_addr;
  85. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  86. proxy_pass http://120.46.159.163:7001/;
  87. }
  88. location /prod-api/{
  89. proxy_set_header Host $http_host;
  90. proxy_set_header X-Real-IP $remote_addr;
  91. proxy_set_header REMOTE-HOST $remote_addr;
  92. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  93. proxy_pass http://120.46.159.163:7004/;
  94. }
  95. location /ezhizao-dms-production/{
  96. proxy_set_header Host $http_host;
  97. proxy_set_header X-Real-IP $remote_addr;
  98. proxy_set_header REMOTE-HOST $remote_addr;
  99. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  100. proxy_pass http://120.46.159.163:7003/;
  101. }
  102. location /ezhizao-dms-p2/{
  103. proxy_set_header Host $http_host;
  104. proxy_set_header X-Real-IP $remote_addr;
  105. proxy_set_header REMOTE-HOST $remote_addr;
  106. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  107. proxy_pass http://120.46.159.163:7002/;
  108. }
  109. error_page 500 502 503 504 /50x.html;
  110. location = /50x.html {
  111. root html;
  112. }
  113. }
  114. server {
  115. listen 80;
  116. server_name 120.46.159.163;
  117. # ssl_certificate /home/nginx/html/dms/ssl/www.dljpwx.com.crt;
  118. # ssl_certificate_key /home/nginx/html/dms/ssl/www.dljpwx.com.key;
  119. # ssl_session_cache shared:SSL:1m;
  120. # ssl_ciphers HIGH:!aNULL:!MD5;
  121. # ssl_prefer_server_ciphers on;
  122. location / {
  123. root /home/nginx/html/dms/dist;
  124. try_files $uri $uri/ /index.html;
  125. index index.html index.htm;
  126. }
  127. location /ezhizao-dms-sys/{
  128. proxy_set_header Host $http_host;
  129. proxy_set_header X-Real-IP $remote_addr;
  130. proxy_set_header REMOTE-HOST $remote_addr;
  131. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  132. proxy_pass http://120.46.159.163:7001/;
  133. }
  134. location /ezhizao-dms-p2/{
  135. proxy_set_header Host $http_host;
  136. proxy_set_header X-Real-IP $remote_addr;
  137. proxy_set_header REMOTE-HOST $remote_addr;
  138. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  139. proxy_pass http://120.46.159.163:7002/;
  140. }
  141. location /ezhizao-dms-production/{
  142. proxy_set_header Host $http_host;
  143. proxy_set_header X-Real-IP $remote_addr;
  144. proxy_set_header REMOTE-HOST $remote_addr;
  145. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  146. proxy_pass http://120.46.159.163:7003/;
  147. }
  148. location /ezhizao-dms-app/{
  149. proxy_set_header Host $http_host;
  150. proxy_set_header X-Real-IP $remote_addr;
  151. proxy_set_header REMOTE-HOST $remote_addr;
  152. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  153. proxy_pass http://120.46.159.163:7004/;
  154. }
  155. location /ws-sys/ {
  156. proxy_http_version 1.1; # WebSocket 需要 HTTP/1.1
  157. proxy_set_header Upgrade $http_upgrade; # 传递 Upgrade 头
  158. proxy_set_header Connection "upgrade"; # 传递 Connection 头
  159. proxy_set_header Host $http_host;
  160. proxy_set_header X-Real-IP $remote_addr;
  161. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  162. proxy_pass http://120.46.159.163:7001/wsMessage/;
  163. }
  164. location /ws-production/ {
  165. proxy_http_version 1.1; # WebSocket 需要 HTTP/1.1
  166. proxy_set_header Upgrade $http_upgrade; # 传递 Upgrade 头
  167. proxy_set_header Connection "upgrade"; # 传递 Connection 头
  168. proxy_set_header Host $http_host;
  169. proxy_set_header X-Real-IP $remote_addr;
  170. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  171. proxy_pass http://120.46.159.163:7001/wsExport/;
  172. }
  173. location /ezhizao-dms-jd/{
  174. proxy_set_header Host $http_host;
  175. proxy_set_header X-Real-IP $remote_addr;
  176. proxy_set_header REMOTE-HOST $remote_addr;
  177. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  178. proxy_pass http://120.46.159.163:7006/;
  179. }
  180. error_page 500 502 503 504 /50x.html;
  181. location = /50x.html {
  182. root html;
  183. }
  184. }
  185. }