nginx.conf 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. worker_processes 8;
  2. events {
  3. worker_connections 2048;
  4. multi_accept on;
  5. use epoll;
  6. }
  7. http {
  8. include /home/vagrant/FrameworkBenchmarks/installs/nginx/conf/mime.types;
  9. default_type application/octet-stream;
  10. access_log off;
  11. sendfile on;
  12. tcp_nopush on;
  13. tcp_nodelay on;
  14. keepalive_timeout 65;
  15. open_file_cache max=2000 inactive=20s;
  16. open_file_cache_valid 60s;
  17. open_file_cache_min_uses 5;
  18. open_file_cache_errors off;
  19. #FastCGI optimizations
  20. fastcgi_buffers 256 16k;
  21. fastcgi_buffer_size 128k;
  22. fastcgi_connect_timeout 30s;
  23. fastcgi_send_timeout 60s;
  24. fastcgi_read_timeout 60s;
  25. fastcgi_busy_buffers_size 256k;
  26. fastcgi_temp_file_write_size 256k;
  27. reset_timedout_connection on;
  28. server_names_hash_bucket_size 100;
  29. upstream fastcgi_backend {
  30. server 127.0.0.1:9001;
  31. keepalive 32;
  32. }
  33. server {
  34. listen 8080;
  35. server_name localhost;
  36. root /home/vagrant/FrameworkBenchmarks/frameworks/PHP/php-laravel/public/;
  37. index index.php;
  38. location / {
  39. try_files $uri $uri/ /index.php?$uri&$args;
  40. }
  41. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  42. #
  43. location ~ \.php$ {
  44. try_files $uri =404;
  45. fastcgi_pass fastcgi_backend;
  46. fastcgi_keep_conn on;
  47. fastcgi_index index.php;
  48. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  49. include /home/vagrant/FrameworkBenchmarks/installs/nginx/conf/fastcgi_params;
  50. }
  51. }
  52. }