18739325251
您的当前位置:主页 > 知识博客 > Laravel开发 >

宝塔Linux面板niginx服务器部署laravel项目报错

时间:2018-12-01

        图方便,在配置服务器环境时一直用的一键集成环境,早期用的是phpstudy,运行在windows server服务器,但是碍于性能原因,决定改用LINUX服务器运行PHP程序,于是就选择了大名鼎鼎的宝塔linux面板。
然而,在部署laravel项目时,就遇到了问题:

      
Warning: require(): open_basedir restriction in effect. File(/www/wwwroot/tqcms/bootstrap/autoload.php) is not within the allowed path(s): (/www/wwwroot/tqcms/public/:/tmp/:/proc/) in /www/wwwroot/tqcms/public/index.php on line 21

    Warning: require(/www/wwwroot/tqcms/bootstrap/autoload.php): failed to open stream: Operation not permitted in /www/wwwroot/tqcms/public/index.php on line 21

    Fatal error: require(): Failed opening required '/www/wwwroot/tqcms/public/../bootstrap/autoload.php' (include_path='.:/www/server/php/56/lib/php') in /www/wwwroot/tqcms/public/index.php on line 
21

   图片如下:

     



      百度上搜了一堆,都没有找到有效的解决方案,差点放弃直接,看到一篇文章中的解决方法,姑且一试,竟然成功了,在此记录下来,方便其他同学看到。

       说白了就是两个地方的配置:


    (1)

 


(2)


这两个地方设置毕业,打开你的网址就能正常访问了



卓微互联,专业的互联网技术服务商
提供APP开发小程序开发内容管理系统定制开发



技术支持:卓微网络科技 Copyright © 2015-2019 www.vrzytt.com 卓微科技 版权所有 豫ICP备16026818号-1