В общем, нарисовался вот такой конфиг, есть замечание, даже со статичным index.html все получается, есть замечание?
location / {
root /home/admin/web/site.com/public_html;
location ~ ^/[A-Z][A-Za-z]*. {
rewrite ^/(.*)$ /index2.php?q=$1 last;
}
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?q=$1 last;
}
location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
expires max;
}
location ~ [^/]\.php(/|$) {
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
}
location ~* ^.+\.(xml|ini|bin|sql|log)$ {
deny all;
return 403;
}
location ~* ^/(hosts|core|patches|db|others|tmp)/ {
deny all;
return 403;
}
}