我的nginx(和php-fpm)虚拟主机配置有问题。问题是所有请求(静态文件除外)都返回HTTP 500(内部服务器错误)
这是我的nginx vh代码
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;
}
}
然而,当我使用php的内置开发服务器服务时,一切正常。仅供参考,它是一款laravel app
提前致谢