When setting up a collection program using the Thinkphp framework on the nginx server, ThinkPhp stops at the welcome page. after modification and debugging, it is found that, thinkPhp uses the path_info variable to build a collection program using the Thinkphp framework on the nginx server and stops ThinkPhp on the welcome page. after modification and debugging, it is found that ThinkPhp uses the path_info variable, this variable does not have a numeric value in nginx by default, so the nginx configuration is modified to achieve the goal. This situation has also been encountered before. Previously, we modified php and obtained another variable for analysis. It is difficult to modify the source code of ThinkPhp this time, so we have modified the nginx configuration.
Location ~ \. Php ($ | /){
# Omitted configuration
Set $ script $ uri;
Set $ path_info "/";
If ($ uri ~ "^ (. + \. Php) (/. + )")
{
Set $ script $1;
Set $ path_info $2;
}
Fastcgi_paramPATH_INFO $ path_info;
Fastcgi_paramSCRIPT_FILENAME $ document_root/$ script;
Fastcgi_paramSCRIPT_NAME $ script;
}