laraval 放到 nginx 服务器上之后,运行报 500 错误
这是我的nginx配置
`server {
listen 80;
server_name mxsy2305.6655.la;
charset utf-8;
root /ynw/zuopinji/public;
location / {
try_files $uri $uri/ /index.php$is_args$query_string;
index index.html index.htm index.php;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location ~ .*.(svn|git|cvs) {
return 404;
}
location ~ \.php($|/) {
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param PHP_VALUE "open_basedir=$document_root:/tmp/:/proc/";
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
include fastcgi_params;
}
location ~ ^/(images|javascript|js|css|flash|media|static)/ {
expires 30d;
}
}`
关于 LearnKu
composer install执行了没,看看php错误日志,和nginx没关系
可能还有
storage文件夹权限的问题看日志
目测应该是文件权限问题吧. 可以看看这里, 不过是英文的
还有运行下composer install, npm install
最后, 你可以用php artisan tinker命令看看能不能执行, 或者报什么错误.
当然还是建议你翻下laravel.log
因为没有.env文件 cp 一份!