require(): open_basedir restriction in effect. File(/www/wwwroot/xcx/zerg/thinkphp/start.php) is not within the allowed path(s): (/www/wwwroot/xcx/zerg/public/:/tmp/:/proc/) in /www/wwwroot/xcx/zerg/p

解决方法:
在如下文件增加一项(如图所示)

在如下文件增加一项(如图所示):

#php文件采用fastcgi解析并设置参数
location ~ \.php {
try_files $uri = 404;
fastcgi_index /index.php;
fastcgi_pass ********;
#加载fastcgi.conf文件中的参数
include fastcgi.conf;
#设置有权限目录,fastcgi.conf中默认设置就是站点目录$document_root,如果要改变就需要重新赋值
#phalcon举例
#fastcgi_param PHP_ADMIN_VALUE "open_basedir=/www/wwwroot/xcx/zerg/:/data/tmp/php/upload/:/proc/";
}
访问项目:


继续配置

location / {
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=$ last;
break;
}
}


圆满解决!!!!!!!!!!!!!!
参考文件:
http://blog.csdn.net/leiflyy/article/details/68063423
https://www.iamle.com/archives/1609.html
http://blog.csdn.net/slqgenius/article/details/52949191(主要解决参看的文件)



require(): open_basedir restriction in effect. File(/www/wwwroot/xcx/zerg/thinkphp/start.php) is not within the allowed path(s): (/www/wwwroot/xcx/zerg/public/:/tmp/:/proc/) in /www/wwwroot/xcx/zerg/p的更多相关文章
- thinkPHP5配置nginx环境无法打开(require(): open_basedir restriction in effect. File(/mnt/hgfs/root/tp5/thinkphp/start.php) is not within the allowed path(s)
今天想把玩一下tp5,结果怎么都无法访问,每次都是报500错误,我把错误提示都打开看到下面的错误 require(): open_basedir restriction in effect. File ...
- Warning: require(): open_basedir restriction in effect. File(/www/wwwroot/../thinkphp/start.php) is not within the allowed path(s):
Warning: require(): open_basedir restriction in effect. File(/www/wwwroot//../thinkphp/start.php) is ...
- require(): open_basedir restriction in effect. File
新安装的 lnmp 环境,将项目放上报 require(): open_basedir restriction in effect. File 的错误! 错误日志显示,访问脚本不在 open_base ...
- php Warning: require(): open_basedir restriction in effect File(/www/wwwroot/default/
解决方案如下: 一.找到修改fastcgi的配置文件 (/usr/local/nginx/conf/fastcgi.conf) 二.vi进行编辑(保存退出) 三.对虚拟主机配置进行重写在Nginx低版 ...
- require(): open_basedir restriction in effect. 解决方法
在linux服务器部署thinkphp5的时候PHP报了这个错误, 如下: Warning: require(): open_basedir restriction in effect. File(/ ...
- LNMP - Warning: require(): open_basedir restriction in effect错误解决方法
LNMP 1.4或更高版本如果不想用防跨目录或者修改.user.ini的防跨目录的目录还需要将 /usr/local/nginx/conf/fastcgi.conf 里面的fastcgi_param ...
- open_basedir restriction in effect. File() is not within the allowed path(s)
目前发现eaccelerator安装之后如果php.ini中设置open_basedir将导致open_basedir的一些报错(open_basedir restriction in effect. ...
- php 环境require(): open_basedir restriction in effect 错误
php 环境require(): open_basedir restriction in effect 错误 错误日志显示,访问脚本不在 open_basedir的限定目录里面 解决方法打开fastc ...
- lnmp 环境require(): open_basedir restriction in effect 错误
最近配置开发用的lnmp环境,环境配置完成后,爆500错误,查看nginx错误日志 open_basedir 将 PHP 所能打开的文件限制在指定的目录树,包括文件本身 错误日志显示,访问脚本不在 o ...
随机推荐
- 10.MongoDB
1.安装(1.1):去官方下载最新的包,http://www.mongodb.org/downloads(1.2):然后tar zvxf 解压(1.3):拷贝到相应的文件夹即可2.在Shell里面启动 ...
- Interlocked.Increment()函数详解 (转载)
原文地址 class Program { static object lockObj = new object(); ; ; //假设要处理的数据源 , ).ToList(); static void ...
- Pandas 用法汇总
一.生成数据表 1.首先导入pandas 库,一般会用到 numpy 库,所以我们先导入备用: import numpy as np import pandas as pd 2.生成 CSV 或者 x ...
- vue项目真机测试
1.在项目中重启命令行运行ipconfig(如果是ios系统运行ifconfig)获取到项目在本机运行的ip地址 2.在项目的package.json中修改允许访问ip地址(--host 0.0.0. ...
- jwt 认证
目录 jwt 认证示意图 jwt 认证算法:签发与检验 drf 项目的 jwt 认证开发流程(重点) drf-jwt 框架基本使用 token 刷新机制(了解) jwt 认证示意图 jwt 优势 1 ...
- mysql 提取 schema,table,column names
参考: https://dzone.com/articles/how-use-linkedin-market-your 表空间信息 https://coderanch.com/t/300498/dat ...
- 标准模板库中的向量(vector)
//C++数据结构与算法(第4版) Adam Drozdek 著 徐丹 吴伟敏<<清华大学出版社>> 头文件:#include<vector> 向量是最简单的S ...
- Day3-I-Squares POJ2002
A square is a 4-sided polygon whose sides have equal length and adjacent sides form 90-degree angl ...
- jquery获取select选中的文本值
误区: 一直以为jquery获取select中option被选中的文本值,是这样写的: $("#id").text(); //获取所有option的文本值 实际上应该这样: ...
- 1. GC标记-清除算法(Mark Sweep GC)
世界上第一个GC算法,由 JohnMcCarthy 在1960年发布. 标记-清除算法由标记阶段和清除阶段构成. 标记阶段就是把所有的活动对象都做上标记的阶段. 标记阶段就是"遍历对象并标记 ...