nginx_vendor.conf 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. user nginx;
  2. worker_processes 16;
  3. error_log /var/error.log info;
  4. worker_rlimit_nofile 10240;
  5. events {
  6. worker_connections 8192;
  7. multi_accept on;
  8. use epoll;
  9. }
  10. http
  11. {
  12. include mime.types;
  13. default_type application/octet-stream;
  14. underscores_in_headers on;
  15. client_max_body_size 32M;
  16. client_body_buffer_size 1024K;
  17. tcp_nopush on;
  18. sendfile on;
  19. keepalive_timeout 300;
  20. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  21. '$status $body_bytes_sent "$http_referer" '
  22. '"$http_user_agent" "$http_x_forwarded_for"';
  23. # upstream redmine{
  24. # server docker.hostip:8080;
  25. # }
  26. server
  27. {
  28. listen 80;
  29. set $folder_name /var/www/html;
  30. server_name ylweb.xyzshops.cn;
  31. root $folder_name;
  32. index index.html index.php;
  33. proxy_connect_timeout 500s;
  34. proxy_read_timeout 500s;
  35. proxy_send_timeout 500s;
  36. fastcgi_connect_timeout 75;
  37. fastcgi_read_timeout 600;
  38. fastcgi_send_timeout 600;
  39. fastcgi_buffer_size 32K;
  40. fastcgi_buffers 32 32K;
  41. set_real_ip_from 100.64.0.0/10;
  42. real_ip_header X-Forwarded-For;
  43. charset utf-8;
  44. location /logs {
  45. deny all;
  46. return 403;
  47. }
  48. location /data/log {
  49. deny all;
  50. return 403;
  51. }
  52. location / {
  53. index index.html index.htm index.php;
  54. }
  55. location /mshop {
  56. root $folder_name;
  57. autoindex on;
  58. index index.html index.htm index.php;
  59. try_files $uri $uri/ /mshop/index.html;
  60. }
  61. location /plot {
  62. root $folder_name;
  63. proxy_pass http://172.26.95.252:5000; #指向39.101.140.116
  64. proxy_redirect off;
  65. proxy_set_header Host $host;
  66. proxy_set_header X-Real-IP $remote_addr;
  67. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  68. proxy_set_header X-Forwarded-Proto $scheme;
  69. }
  70. location /redmine {
  71. proxy_pass http://docker.hostip:8080;
  72. proxy_redirect off;
  73. proxy_set_header Host $host;
  74. proxy_set_header X-Real-IP $remote_addr;
  75. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  76. proxy_set_header X-Forwarded-Proto $scheme;
  77. }
  78. location /merchant {
  79. root $folder_name;
  80. autoindex on;
  81. index index.html index.htm index.php;
  82. try_files $uri $uri/ /merchant/index.html;
  83. }
  84. location ~ /mobile/[/\w]+\.php$ {
  85. root $folder_name;
  86. fastcgi_pass docker.hostip:9700;
  87. fastcgi_index index.php;
  88. fastcgi_param SCRIPT_FILENAME $folder_name$fastcgi_script_name;
  89. fastcgi_param SIGN $http_sign;
  90. include fastcgi_params;
  91. }
  92. location ~ /mobile/[/\w]+\.html$ {
  93. try_files $uri $uri/ /mobile/index.html;
  94. }
  95. location ~ /racc/[/\w]+\.php$ {
  96. root $folder_name;
  97. fastcgi_pass docker.hostip:9701;
  98. fastcgi_index index.php;
  99. fastcgi_param SCRIPT_FILENAME $folder_name$fastcgi_script_name;
  100. fastcgi_param SIGN $http_sign;
  101. include fastcgi_params;
  102. }
  103. location ~ /mchsrv/[/\w]+\.php$ {
  104. root $folder_name;
  105. fastcgi_pass docker.hostip:9702;
  106. fastcgi_index index.php;
  107. fastcgi_param SCRIPT_FILENAME $folder_name$fastcgi_script_name;
  108. fastcgi_param SIGN $http_sign;
  109. include fastcgi_params;
  110. }
  111. location ~ \.php$ {
  112. add_header Cache-Control no-store;
  113. root $folder_name;
  114. fastcgi_pass docker.hostip:9600;
  115. fastcgi_index index.php;
  116. fastcgi_param SCRIPT_FILENAME $folder_name$fastcgi_script_name;
  117. fastcgi_buffer_size 1024K;
  118. fastcgi_buffers 32 1024K;
  119. proxy_buffer_size 128k; #设置缓冲区的大小和数量
  120. proxy_buffers 100 128k; #
  121. proxy_read_timeout 900s;
  122. proxy_send_timeout 900s;
  123. fastcgi_read_timeout 900;
  124. fastcgi_send_timeout 900;
  125. keepalive_timeout 900;
  126. include fastcgi_params;
  127. }
  128. }
  129. }