nginx-xyztest-http.conf 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. user nginx;
  2. worker_processes 8;
  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. fastcgi_buffer_size 32k;
  15. fastcgi_buffers 8 32k;
  16. underscores_in_headers on;
  17. client_max_body_size 1024M;
  18. tcp_nopush on;
  19. sendfile on;
  20. keepalive_timeout 65;
  21. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  22. '$status $body_bytes_sent "$http_referer" '
  23. '"$http_user_agent" "$http_x_forwarded_for"';
  24. server
  25. {
  26. listen 80;
  27. set $folder_name /var/www/html;
  28. server_name test.xyzshops.cn;
  29. root $folder_name;
  30. index index.html index.php;
  31. client_max_body_size 100m;
  32. proxy_connect_timeout 500s;
  33. proxy_read_timeout 500s;
  34. proxy_send_timeout 500s;
  35. fastcgi_connect_timeout 75;
  36. fastcgi_read_timeout 600;
  37. fastcgi_send_timeout 600;
  38. charset utf-8;
  39. location /logs {
  40. deny all;
  41. return 403;
  42. }
  43. location /data/log {
  44. deny all;
  45. return 403;
  46. }
  47. location / {
  48. index index.html index.htm index.php;
  49. }
  50. location /mshop {
  51. root $folder_name;
  52. autoindex on;
  53. index index.html index.htm index.php;
  54. try_files $uri $uri/ /mshop/index.html;
  55. }
  56. location /plot {
  57. root $folder_name;
  58. proxy_pass http://docker.hostip:5000;
  59. proxy_redirect off;
  60. proxy_set_header Host $host;
  61. proxy_set_header X-Real-IP $remote_addr;
  62. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  63. proxy_set_header X-Forwarded-Proto $scheme;
  64. }
  65. location /merchant {
  66. root $folder_name;
  67. autoindex on;
  68. index index.html index.htm index.php;
  69. try_files $uri $uri/ /merchant/index.html;
  70. }
  71. location ~ /mobile/[/\w]+\.php$ {
  72. root $folder_name;
  73. fastcgi_pass docker.hostip:9100;
  74. fastcgi_index index.php;
  75. fastcgi_param SCRIPT_FILENAME $folder_name$fastcgi_script_name;
  76. fastcgi_param SIGN $http_sign;
  77. include fastcgi_params;
  78. }
  79. location ~ /mobile/[/\w]+\.html$ {
  80. try_files $uri $uri/ /mobile/index.html;
  81. }
  82. location ~ /racc/[/\w]+\.php$ {
  83. root $folder_name;
  84. fastcgi_pass docker.hostip:9101;
  85. fastcgi_index index.php;
  86. fastcgi_param SCRIPT_FILENAME $folder_name$fastcgi_script_name;
  87. fastcgi_param SIGN $http_sign;
  88. include fastcgi_params;
  89. }
  90. location ~ /mchsrv/[/\w]+\.php$ {
  91. root $folder_name;
  92. fastcgi_pass docker.hostip:9102;
  93. fastcgi_index index.php;
  94. fastcgi_param SCRIPT_FILENAME $folder_name$fastcgi_script_name;
  95. fastcgi_param SIGN $http_sign;
  96. include fastcgi_params;
  97. }
  98. location ~ \.php$ {
  99. add_header Cache-Control no-store;
  100. root $folder_name;
  101. fastcgi_pass docker.hostip:9000;
  102. fastcgi_index index.php;
  103. fastcgi_param SCRIPT_FILENAME $folder_name$fastcgi_script_name;
  104. include fastcgi_params;
  105. }
  106. }
  107. }