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=$1 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(主要解决参看的文件)

 

 

posted @ 2018-03-14 14:05  邹柯  阅读(1519)  评论(0编辑  收藏  举报