nginx.conf 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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. server
  24. {
  25. listen 80;
  26. set $folder_name /var/www/html;
  27. server_name ylapi.xyzshops.cn;
  28. root $folder_name;
  29. index index.html index.php;
  30. proxy_connect_timeout 500s;
  31. proxy_read_timeout 500s;
  32. proxy_send_timeout 500s;
  33. fastcgi_connect_timeout 75;
  34. fastcgi_read_timeout 600;
  35. fastcgi_send_timeout 600;
  36. fastcgi_buffer_size 32K;
  37. fastcgi_buffers 32 32K;
  38. set_real_ip_from 100.64.0.0/10;
  39. real_ip_header X-Forwarded-For;
  40. charset utf-8;
  41. location /logs {
  42. deny all;
  43. return 403;
  44. }
  45. location /data/log {
  46. deny all;
  47. return 403;
  48. }
  49. location / {
  50. index index.html index.htm index.php;
  51. }
  52. location /mshop {
  53. root $folder_name;
  54. autoindex on;
  55. index index.html index.htm index.php;
  56. try_files $uri $uri/ /mshop/index.html;
  57. }
  58. location /chinatelecom {
  59. root $folder_name;
  60. autoindex on;
  61. index index.html index.htm index.php;
  62. try_files $uri $uri/ /chinatelecom/index.html;
  63. }
  64. location /plot {
  65. deny all;
  66. return 403;
  67. }
  68. location /merchant {
  69. deny all;
  70. return 403;
  71. }
  72. location /mchsrv {
  73. deny all;
  74. return 403;
  75. }
  76. location ~ /mobile/[/\w]+\.php$ {
  77. root $folder_name;
  78. fastcgi_pass docker.hostip:9700;
  79. fastcgi_index index.php;
  80. fastcgi_param SCRIPT_FILENAME $folder_name$fastcgi_script_name;
  81. fastcgi_param SIGN $http_sign;
  82. include fastcgi_params;
  83. }
  84. location ~ /mobile/[/\w]+\.html$ {
  85. try_files $uri $uri/ /mobile/index.html;
  86. }
  87. location ~ /racc/[/\w]+\.php$ {
  88. root $folder_name;
  89. fastcgi_pass docker.hostip:9701;
  90. fastcgi_index index.php;
  91. fastcgi_param SCRIPT_FILENAME $folder_name$fastcgi_script_name;
  92. fastcgi_param SIGN $http_sign;
  93. include fastcgi_params;
  94. }
  95. location ~ /vapi/[/\w]+\.php$ {
  96. root $folder_name;
  97. fastcgi_pass docker.hostip:9703;
  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 ~ \.php$ {
  104. add_header Cache-Control no-store;
  105. root $folder_name;
  106. fastcgi_pass 172.26.80.6:9600; #39.103.141.163
  107. fastcgi_index index.php;
  108. fastcgi_param SCRIPT_FILENAME $folder_name$fastcgi_script_name;
  109. fastcgi_buffer_size 1024K;
  110. fastcgi_buffers 32 1024K;
  111. proxy_buffer_size 128k; #设置缓冲区的大小和数量
  112. proxy_buffers 100 128k; #
  113. proxy_read_timeout 900s;
  114. proxy_send_timeout 900s;
  115. fastcgi_read_timeout 900;
  116. fastcgi_send_timeout 900;
  117. keepalive_timeout 900;
  118. include fastcgi_params;
  119. }
  120. }
  121. }