1.直接报403错误 ,配置文件中增加:
location / { try_files $uri $uri/ /index.php?$query_string; }
同时根目录不是指到项目名,而是指到public目录 下面。
2.显示一片空白 : 给storage 777的权限
3.显示NO application encryption key has been specified 的错误 :在根目录 下执行:
php artisan key:generate
4.Warning: require(): open_basedir restriction in effect. File(/www/wwwroot/bbs/vendor/autoload.php) is not within the allowed path(s): (/www/wwwroot/bbs/public/:/tmp/:/proc/) in /www/wwwroot/bbs/public/index.php on line 24
答案:https://www.bt.cn/bbs/forum.php?mod=viewthread&tid=6877&highlight=open%5C_basedir
因为用的是宝塔,所以去vhost.conf中选择 网站目录--》防跨站攻击 的勾去掉就可以了