nginx.conf 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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 /limonade/;
  43. index index.php;
  44. location / {
  45. #try_files $uri $uri/ /index.php?$uri&$args;
  46. fastcgi_pass fastcgi_backend;
  47. fastcgi_keep_conn on;
  48. fastcgi_param SCRIPT_FILENAME $document_root/index.php;
  49. fastcgi_param PATH_INFO $uri;
  50. include /etc/nginx/fastcgi_params;
  51. }
  52. }
  53. }