nginx-slave-http.conf 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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 121.89.212.167;
  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 ~ /mobile/[/\w]+\.php$ {
  57. root $folder_name;
  58. fastcgi_pass 172.16.110.28:9100;
  59. fastcgi_index index.php;
  60. fastcgi_param SCRIPT_FILENAME $folder_name$fastcgi_script_name;
  61. include fastcgi_params;
  62. }
  63. location ~ /mobile/[/\w]+\.html$ {
  64. try_files $uri $uri/ /mobile/index.html;
  65. }
  66. location ~ /racc/[/\w]+\.php$ {
  67. root $folder_name;
  68. fastcgi_pass 172.16.110.28:9101;
  69. fastcgi_index index.php;
  70. fastcgi_param SCRIPT_FILENAME $folder_name$fastcgi_script_name;
  71. include fastcgi_params;
  72. }
  73. location ~ \.php$ {
  74. add_header Cache-Control no-store;
  75. root $folder_name;
  76. fastcgi_pass 172.16.110.28:9000;
  77. fastcgi_index index.php;
  78. fastcgi_param SCRIPT_FILENAME $folder_name$fastcgi_script_name;
  79. include fastcgi_params;
  80. }
  81. }
  82. }