nginx.conf 1.6 KB

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