Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2012
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. upstream php_backend
  2. {
  3. # server unix:/tmp/php-cgi.socket;
  4. server 127.0.0.1:9000;
  5. server 127.0.0.1:9000;
  6. }
  7.  
  8.  
  9. server
  10. {
  11. listen 80;
  12. server_name localhost;
  13.  
  14. charset utf-8;
  15. index index.php index.html;
  16. root /path/to/localhost;
  17.  
  18. error_page 404 =404 @php;
  19.  
  20.  
  21. location /
  22. {
  23. try_files @php @php =404;
  24. }
  25.  
  26.  
  27. location ~* \.(?:js|css|png|jpe?g|gif|ico)$
  28. {
  29. expires max;
  30. log_not_found off;
  31. }
  32.  
  33.  
  34. ## PHP5-FPM handler
  35. location ~ \.php$
  36. {
  37. ## NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
  38. fastcgi_pass php_backend;
  39. fastcgi_index index.php;
  40.  
  41. include fastcgi_params;
  42. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  43. }
  44.  
  45.  
  46. location @php
  47. {
  48. ## NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
  49. fastcgi_pass php_backend;
  50. fastcgi_index index.php;
  51.  
  52. include fastcgi_params;
  53. fastcgi_param SCRIPT_FILENAME $document_root/index.php;
  54. }
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement