nginx.conf 989 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. worker_processes 8;
  2. events {
  3. worker_connections 1024;
  4. }
  5. http {
  6. include /usr/local/nginx/conf/mime.types;
  7. default_type application/octet-stream;
  8. sendfile on;
  9. keepalive_timeout 65;
  10. upstream fastcgi_backend {
  11. server 127.0.0.1:9001;
  12. keepalive 32;
  13. }
  14. server {
  15. listen 80;
  16. server_name localhost;
  17. root /home/fb/FrameworkBenchmarks/php-senthot/app/;
  18. index index.php;
  19. location / {
  20. try_files $uri /index.php?$args;
  21. if (-f $request_filename) {
  22. expires max;
  23. break;
  24. }
  25. }
  26. location ~ \.php$ {
  27. try_files $uri =404;
  28. fastcgi_pass fastcgi_backend;
  29. fastcgi_keep_conn on;
  30. fastcgi_index index.php;
  31. include /usr/local/nginx/conf/fastcgi_params;
  32. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  33. }
  34. }
  35. }