LNMP 1.4 网站无法访问

来源:互联网 发布:软件技术职称 编辑:程序博客网 时间:2024/05/01 16:15

前几天升级了LNMP一键安装包1.4 以后发现页面白屏,没有返回页面。 查看网站nginx error. log 发现 。


*1 FastCGI sent in stderr: "PHP message: PHP Warning:  require(): open_basedir restriction in effect. File(/var/www/XXXX/XXX/bootstrap.php) is not within the allowed path(s): (/var/www/XXXX/webroot/:/tmp/:/proc/) in /var/www/XXXX/webroot/index.php on line 2

在网上查了很久发现, 在LNMP1.4 中默认开启了 open_basedir  用了很多方法。最后找到在nginx 的 fastcgi 中有个

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

注释之 即可访问。 


该项主要是用来限制加载其他目录 页面的。为了网站的安全性。而目前的larval .yii 等 document_root 一般都在public ,web 下。所以无法加载框架文件导致!

原创粉丝点击