server {
location / {
index index.php index.html index.htm;
if (-f $request_filename) {
break;
}
if (!-e $request_filename) {
rewrite ^(.+)$ /index.php last;
break;
}
}
location ~ \.php$
{
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /sites/
host.ru$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
include /opt/local/etc/nginx/fastcgi_params;
}
}