nginx_admin.conf 3.5 KB

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