admin.conf 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. user nginx;
  2. worker_processes 16;
  3. error_log /var/www/html/data/log/anginx.log debug;
  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 web.mhigh.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 /data/log {
  42. deny all;
  43. return 403;
  44. }
  45. location / {
  46. index index.html index.htm index.php;
  47. }
  48. location ~ /mobile {
  49. deny all;
  50. return 403;
  51. }
  52. location ~ /racc {
  53. deny all;
  54. return 403;
  55. }
  56. location /mshop {
  57. root $folder_name;
  58. autoindex on;
  59. index index.html index.htm index.php;
  60. try_files $uri $uri/ /mshop/index.html;
  61. }
  62. location /plot {
  63. root $folder_name;
  64. proxy_pass http://172.22.67.134:5000;
  65. proxy_redirect off;
  66. proxy_set_header Host $host;
  67. proxy_set_header X-Real-IP $remote_addr;
  68. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  69. proxy_set_header X-Forwarded-Proto $scheme;
  70. }
  71. location /merchant {
  72. root $folder_name;
  73. autoindex on;
  74. index index.html index.htm index.php;
  75. try_files $uri $uri/ /merchant/index.html;
  76. }
  77. location ~ /mchsrv/[/\w]+\.php$ {
  78. root $folder_name;
  79. fastcgi_pass mch:9000;
  80. fastcgi_index index.php;
  81. fastcgi_param SCRIPT_FILENAME $folder_name$fastcgi_script_name;
  82. fastcgi_param SIGN $http_sign;
  83. include fastcgi_params;
  84. }
  85. location ~ \.php$ {
  86. add_header Cache-Control no-store;
  87. root $folder_name;
  88. fastcgi_pass web:9000;
  89. fastcgi_index index.php;
  90. fastcgi_param SCRIPT_FILENAME $folder_name$fastcgi_script_name;
  91. fastcgi_buffer_size 1024K;
  92. fastcgi_buffers 32 1024K;
  93. proxy_buffer_size 128k; #设置缓冲区的大小和数量
  94. proxy_buffers 100 128k; #
  95. proxy_read_timeout 900s;
  96. proxy_send_timeout 900s;
  97. fastcgi_read_timeout 900;
  98. fastcgi_send_timeout 900;
  99. keepalive_timeout 900;
  100. include fastcgi_params;
  101. }
  102. }
  103. }