1. 程式人生 > >Warning: require(): open_basedir restriction in effect. File(/home/framework/laravel/

Warning: require(): open_basedir restriction in effect. File(/home/framework/laravel/

配框架訪問報錯

laravel 配置域名訪問 Warning: require(): open_basedir restriction in effect. File(/home/framework/laravel…………………

1 .


   配置nginx 通過域名或者ip 訪問框架時不要配置到public 目錄下
   訪問:www.xxx.com/public

2.


vim /usr/local/nginx/conf/fastcgi.conf

fastcgi_param PHP_ADMIN_VALUE"open_basedir=$document_root/:/tmp/:/proc/";

改成:

fastcgi_param PHP_ADMIN_VALUE "open_basedir=NULL"
; 然後重啟一下服務 OK