root /home/u1/domains/example.com/web;

location / {
  try_files $uri /app.php$is_args$args;
}

location ~ ^/(app_dev|config)\.php(/|$) {
  fastcgi_pass unix:/var/run/php5-example.com.sock;
  fastcgi_split_path_info ^(.+\.php)(/.*)$;
  include fastcgi_params;
  fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
}

location ~ ^/app\.php(/|$) {
  fastcgi_pass unix:/var/run/php5-example.com.sock;
  fastcgi_split_path_info ^(.+\.php)(/.*)$;
  include fastcgi_params;
  fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
  internal;
}

location ~ /\. {
  deny all;
}
