Мартин:Курите FAQ
Для веб-сервера nginx можно пользоваться следующими правилами:
server {
listen 80;
server_name primer.ru;
root /var/www/primer.ru;
index index.php;
location = /.htaccess { deny all; }
location = /favicon.ico { log_not_found off; access_log off; }
location = /robots.txt { log_not_found off; access_log off; }
location ~ .(js|css|png|jpg|jpeg|gif|ico)$ { access_log off; }
location ~ ^/(db|log|.git|cache|backup|config) { deny all; }
location ~ ^/(?!admin.php|index.php|rss.php|setup.php).*.php$ { deny all; }
location / {
if (!-e $request_filename) {
rewrite ^/index.html$ /index.php last;
rewrite ^/(.*)$ /index.php?ufu=$1 last;
break;
}
}
location ~ .php$ {
fastcgi_split_path_info ^(.+.php)(/.+)$;
fastcgi_pass unix:/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}
это нужно прописывать в nginx.conf ?