nginx.conf 982 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. worker_processes 8;
  2. error_log stderr error;
  3. events {
  4. worker_connections 1024;
  5. }
  6. http {
  7. include /usr/local/nginx/conf/mime.types;
  8. default_type application/octet-stream;
  9. sendfile on;
  10. keepalive_timeout 65;
  11. access_log off;
  12. upstream fastcgi_backend {
  13. server 127.0.0.1:9001;
  14. }
  15. server {
  16. listen 8080;
  17. server_name localhost;
  18. root /home/ubuntu/FrameworkBenchmarks/php-yaf/public/;
  19. index index.php;
  20. location / {
  21. try_files $uri /index.php?$args;
  22. if (-f $request_filename) {
  23. expires max;
  24. break;
  25. }
  26. }
  27. location ~ \.php$ {
  28. try_files $uri =404;
  29. fastcgi_pass fastcgi_backend;
  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. }