nginx-pools.conf 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. user www-data;
  2. worker_processes auto;
  3. error_log stderr error;
  4. timer_resolution 1000ms;
  5. #worker_rlimit_nofile 2000000;
  6. pcre_jit on;
  7. events {
  8. worker_connections 16384;
  9. multi_accept off;
  10. }
  11. http {
  12. include /etc/nginx/mime.types;
  13. default_type application/octet-stream;
  14. access_log off;
  15. server_tokens off;
  16. sendfile on;
  17. tcp_nopush on;
  18. tcp_nodelay on;
  19. keepalive_timeout 65;
  20. keepalive_disable none;
  21. #fastcgi_ignore_client_abort on;
  22. keepalive_requests 10000;
  23. #the bench don't use any static file
  24. #open_file_cache max=2000 inactive=20s;
  25. #open_file_cache_valid 60s;
  26. #open_file_cache_min_uses 5;
  27. #open_file_cache_errors off;
  28. #FastCGI optimizations
  29. fastcgi_buffers 256 16k;
  30. fastcgi_buffer_size 128k;
  31. fastcgi_connect_timeout 30s;
  32. fastcgi_send_timeout 60s;
  33. fastcgi_read_timeout 60s;
  34. fastcgi_busy_buffers_size 256k;
  35. fastcgi_temp_file_write_size 256k;
  36. reset_timedout_connection on;
  37. server_names_hash_bucket_size 100;
  38. upstream fastcgi_backend {
  39. server unix:/var/run/php/php7.3-fpm.sock;
  40. server unix:/var/run/php/php7.3-fpm-2.sock;
  41. keepalive 36;
  42. }
  43. server {
  44. listen 8080 reuseport;
  45. server_name localhost;
  46. root /php/;
  47. index index.php;
  48. location ~ \.php$ {
  49. fastcgi_pass fastcgi_backend;
  50. fastcgi_keep_conn on;
  51. fastcgi_index index.php;
  52. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  53. include /etc/nginx/fastcgi_params;
  54. }
  55. }
  56. }