nginx 配置 path_info

作者: cayman 分类: 未分类 发布时间: 2021-12-12 22:56
 location ~ [^/]\.php(/|$) {
        fastcgi_pass 127.0.0.1:9000;
        set $real_script_name $fastcgi_script_name;
if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {
                set $real_script_name $1;
                set $path_info $2;
 }
fastcgi_param SCRIPT_FILENAME $document_root$real_script_name;
fastcgi_param SCRIPT_NAME $real_script_name;
fastcgi_param PATH_INFO $path_info;
        include snippets/fastcgi-php.conf;
    }
}

发表回复

您的电子邮箱地址不会被公开。