如果浏览器直接报错500,没有输出错误信息。请打卡php报错修改php.ini 种 disply_error =On
Warning: require(): open_basedir restriction in effect. File(/website/zhongJunEnergy/vendor/autoload.php) is not within the allowed path(s): (/website/zhongJunEnergy/public/:/tmp/:/proc/) in /website/zhongJunEnergy/public/index.php on line 24
Warning: require(/website/zhongJunEnergy/vendor/autoload.php): failed to open stream: Operation not permitted in /website/zhongJunEnergy/public/index.php on line 24
Fatal error: require(): Failed opening required '/website/zhongJunEnergy/public/../vendor/autoload.php' (include_path='.:/usr/local/php/lib/php') in /website/zhongJunEnergy/public/index.php on line 24
这是个目录访问权限的问题 找到你的fastcgi文件注释
# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;
#fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/"; 注释这一行
重启即可