Advertisement
Guest User

Untitled

a guest
Mar 16th, 2012
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. server {
  2.  
  3. listen server_ip:80;
  4. server_name example.com;
  5.  
  6. root /var/www/example.com/current/web/;
  7.  
  8. access_log /var/log/nginx/example.com/access.log;
  9. error_log /var/log/nginx/example.com/error.log;
  10.  
  11. rewrite ^/app\.php/?(.*)$ /$1 permanent;
  12.  
  13. location / {
  14. index app.php;
  15. try_files $uri @rewriteapp;
  16.  
  17. }
  18.  
  19. location @rewriteapp {
  20. rewrite ^(.*)$ /app.php/$1 last;
  21. }
  22.  
  23. location ~ ^/(app|app_dev|config)\.php(/|$) {
  24. fastcgi_pass unix:/var/run/example-com-php5-fpm.sock;
  25. fastcgi_split_path_info ^(.+\.php)(/.*)$;
  26. include fastcgi_params;
  27. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  28. fastcgi_param HTTPS off;
  29. }
  30.  
  31. location ~* ^.+\.(jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|wav|bmp|rtf|htc)$ {
  32. expires 31d;
  33. add_header Cache-Control private;
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement