nginx.conf 1.6 KB

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