Server: NGINX + PHP-FPM
Nginx site config:
server {
listen 80;
server_name 176.31.175.91;
index index.php index.html index.htm;
set $root_path '/var/www/public';
root $root_path;
try_files $uri $uri/ @rewrite;
location ~ ^/(status|ping)$ {
access_log off;
include fastcgi_params;
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
location @rewrite {
rewrite ^/(.*)$ /index.php?_url=/$1;
}
location ~ \.php {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index /index.php;
include fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~* ^/(css|img|js|flv|swf|download)/(.+)$ {
root $root_path;
}
location ~ /\.ht {
deny all;
}
}
PHP-FPM config - default
Error:
2015/04/23 21:16:22 [error] 23921#0: *3 FastCGI sent in stderr: "PHP message: PHP Fatal error: Class 'y' not found in /var/www/app/controllers/yController.php on line 21" while reading response header from upstream, client: x.x.x.x, server: 176.31.x.x, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "176.31.175.x"