nginx.conf 1.4 KB

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