支付宝赞助帐号:service@kuitao8.com 

lnmp thinkphp5 跨目录不能访问的问题解决

Created2018-04-20   Views 965    Author 懒人程序
location ~ .*\.php($|/)
            {      
             set $script     $uri;
             set $path_info  "";
                if ($uri ~ "^(.+?\.php)(/.+)$") {
                    set $script     $1;
                    set $path_info  $2;
                }
                try_files $uri =404;
                fastcgi_pass  unix:/tmp/php-cgi.sock;
                fastcgi_index index.php;

                include fastcgi.conf;
                fastcgi_param  SCRIPT_FILENAME    $document_root$script;
                fastcgi_param  SCRIPT_NAME        $script;
                fastcgi_param  PATH_INFO          $path_info;
                fastcgi_param  PHP_ADMIN_VALUE  "open_basedir=$document_root:/tmp/:/proc/:/home/wwwroot/zhaodaima"; 
            }
             error_page  500 502 503 504  /50x.html;
            location = /50x.html {
                root   /home/wwwroot/error;
            }

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

上一篇: PHP开发api接口安全验证【转载】
下一篇: php安装zip报错的解决方法
支持键盘 ← →

邮件订阅

订阅我们的精彩内容