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

location /backend {
  alias /home/u1/domains/example.com/backend/web;
}

location / {
  try_files $uri $uri/ /index.php?$args;
}

location ~ ^/(protected|framework|themes/\w+/views) {
  deny  all;
}

location ~ /\. {
  deny all;
}

location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ {
  try_files $uri =404;
}

location ~ \.php$ {
  fastcgi_split_path_info ^(.+\.php)(/.+)$;
  include fastcgi_params;
  fastcgi_param SCRIPT_FILENAME $request_filename;
  fastcgi_intercept_errors on;
  fastcgi_pass unix:/var/run/php5-example.com.sock;
}
