thinkPHP5配置nginx環境無法開啟 ,每次都是報500錯誤
阿新 • • 發佈:2019-01-24
今天想把玩一下tp5,結果怎麼都無法訪問,每次都是報500錯誤,我把錯誤提示都開啟看到下面的錯誤
require(): open_basedir restriction in effect. File(/mnt/hgfs/root/tp5/thinkphp/start.php) is not within the allowed path(s): (/mnt/hgfs/root/tp5/public/:/tmp/:/proc/)
1,我是php7 ,php.ini裡面的open_basedir 是註釋掉的
2,後來查詢到時fastcgi的問題
3,修改fastcgi的配置檔案 /usr/local/nginx/conf/fastcgi.conf
4,重啟 service nginx restart
5,搞定:
轉載地址:http://www.cnblogs.com/spicy/p/6944981.html
訪問專案報錯:
Warning: require(): open_basedir restriction in effect. File(/home/framework/laravel/
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