lnmp 安装部署laravel框架后报错
2018-08-08 本文已影响22人
史庆雨
错误提示:
Warning: require(): open_basedir restriction in effect. File(/home/wwwroot/default/blog/bootstrap/autoload.php) is not within the allowed path(s): (/home/wwwroot/default/blog/public/:/tmp/:/proc/) in /home/wwwroot/default/blog/public/index.php on line 22
解决办法:
此地址有相关的解决方案:
解决方案:https://www.iamle.com/archives/1854.html
#在php-fpm.conf对应的pool池中行尾配置
php_admin_value[open_basedir]=/home/wwwroot/:/proc/:/tmp/
#在nginx fastcgi fastcgi_param配置
#这里用$document_root是一种取巧的方法,也可以设置绝对路径
# set php open_basedir
fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/";
#在php.ini行尾配置
[HOST=www.iamle.com]
open_basedir=/home/wwwroot/www.iamle.com/:/proc/:/tmp/
[PATH=/home/wwwroot/www.iamle.com/]
open_basedir=/home/wwwroot/www.iamle.com/:/proc/:/tmp/