Здравствуйте. Прошу помощи. Сам всю голову уже сломал.
Есть сервер со связкой nginx1.7.2 + php-fpm(php5.4)
Конфиг nginx взял тут
http://help.docs.umi-cms.ru/konfiguracionnyj_fajl_nginx/UMI ставится, работают разделы, можно походить по страничкам. Не работает авторизация, сбрасывает ошибку 412 при попытке авторизоваться(при чем не важно откуда с админки или сайта) и та же ошибка возникает при попытке отправить данные с любой из форм. Короче, эта ошибка появляется при отправке методом POST.
Вот полный конфиг nginx с моими правками:
server {
server_name test.ru;
root /var/www/umi;
index index.php;
error_log /var/log/nginx/test.ru.error.log debug;
location @php-fpm {
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
include /etc/nginx/conf.d/fastcgi_params;
}
location ~* \/\.ht {
deny all;
}
location ~* ^\/(classes|errors\/logs|sys\-temp|cache|xmldb|static|packages) {
deny all;
}
location ~* (\/for_del_connector\.php|\.ini|\.conf)$ {
deny all;
}
location ~* ^(\/files\/|\/images\/) {
try_files $uri =404;
}
location ~* ^\/images\/autothumbs\/ {
try_files $uri @autothumbs =404;
}
location @autothumbs {
rewrite ^\/images\/autothumbs\/(.*)$ /autothumbs.php?img=$1$query_string last;
}
location @clean_url {
rewrite ^/(.*)$ /index.php?path=$1 last;
}
location @dynamic {
try_files $uri @clean_url;
}
location / {
rewrite ^\/robots\.txt /sbots.php?path=$1 last;
rewrite ^\/sitemap\.xml /sitemap.php last;
rewrite ^\/\~\/([0-9]+)$ /tinyurl.php?id=$1 last;
rewrite ^\/(udata|upage|uobject|ufs|usel|ulang|utype|umess|uhttp):?(\/\/)?(.*)? /releaseStreams.php?scheme=$1&path=$3 last;
rewrite ^\/(.*)\.xml$ /index.php?xmlMode=force&path=$1 last;
rewrite ^(.*)\.json$ /index.php?jsonMode=force&path=$1 last;
if ($cookie_umicms_session) {
error_page 412 = @dynamic;
return 412;
}
if ($request_method = 'POST') {
error_page 412 = @dynamic;
return 412;
}
try_files /sys-temp/static-cache/$host/$uri/index.html @dynamic;
}
location ~* \.js$ {
rewrite ^\/(udata|upage|uobject|ufs|usel|ulang|utype|umess|uhttp):?(\/\/)?(.*)? /releaseStreams.php?scheme=$1&path=$3 last;
try_files $uri =404;
}
location ~* \.(ico|jpg|jpeg|png|gif|swf|css)$ {
try_files $uri =404;
access_log off;
expires 1m;
}
location ~* \.php$ {
error_page 412 = @php-fpm;
return 412;
}
}