When login form requests login_check action, nginx throws 502 error. Cannot figure out why is this happens
2015/11/07 18:49:37 [error] 26038#0: *2 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 127.0.0.1, server: test.local, request: "POST /admin/login/check HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "test.local", referrer: "http://test.local/admin/login"
site nginx config:
server {
server_name test.local;
root /var/www/test.local/web;
location / {
# try to serve file directly, fallback to app.php
try_files $uri /app_dev.php$is_args$args;
}
location ~ .php(/|$) {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;
}
error_log /var/log/nginx/test.local_error.log;
access_log /var/log/nginx/test.local_access.log;
}