nginx.conf 1.4 KB

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