码迷,mamicode.com
首页 > Web开发 > 详细

thinkphp 5.0 lnmp环境下 无法访问,报错500(public目录)

时间:2018-04-03 17:37:34      阅读:1121      评论:0      收藏:0      [点我收藏+]

标签:not   ast   修改   conf   https   tmp   require   xxx   php5   

两种方法:

1.修改fastcgi的配置文件 /usr/local/nginx/conf/fastcgi.conf   

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

 

2.这个时候需要在php.ini下面添加如下内容

注: xxx.abczn.com 替换成你对应的域名和目录

[HOST=xxx.abczn.com]
open_basedir=/home/wwwroot/
xxx.abczn.com:/tmp/:/proc/
[PATH=/home/wwwroot/
xxx.abczn.com]
open_basedir=/home/wwwroot/
xxx.abczn.com:/tmp/:/proc/

 

thinkphp 5.0 lnmp环境下 Warning: require(): open_basedir restriction in effect. File 报错处理

 

thinkPHP5配置nginx环境无法打开(require(): open_basedir restriction in effect. File(/mnt/hgfs/root/tp5/thinkphp/start.php) is not within the allowed path(s)

 

PHP7 有可能需要修改的 php.ini scandir

 

thinkphp 5.0 lnmp环境下 无法访问,报错500(public目录)

标签:not   ast   修改   conf   https   tmp   require   xxx   php5   

原文地址:https://www.cnblogs.com/18JG23/p/8708609.html

(1)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!