Nginx + php-fpm always returns http 500
587
I am having a problem with my nginx (and php-fpm) virtual host configuration. The problem is all requests (except static files) return HTTP 500 (Internal Server Error)
Here is my nginx vh code
server {
listen 80;
root /var/www/somesite/public;
index index.php index.html index.htm;
server_name somesite.com;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
try_files $uri /index.php =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
However when I serve using php's inbuilt development server everything works fine. FYI it's a laravel app
Thanks in advance