How does nginx implement thinkphp without index.php access?

I tried http://www.thinkphp.cn/topic/... The actual visit reported 404

.

nginx 1.10.3
php-fpm
php7.1
Ubuntu 16.04.4 LTS (GNU/Linux 4.4.0-117-generic x86room64)

this is the environment.
here is the relevant configuration of php-fpm in my apache

index index.html index.htm index.php default.html default.php index.nginx-debian.html;

-sharp if (!-e $request_filename)
-sharp {
-sharp     -sharprewriteindex.php
-sharp     rewrite ^/(.*)$ /index.php/$1;
-sharp     -sharpsubdir
-sharp     -sharprewrite ^/subdir/(.*)$ /subdir/index.php/$1;
-sharp }

-sharp location ~ .php
-sharp {
-sharp         -sharp
-sharp         
-sharp         -sharp $path_info pathinfo
-sharp         set $path_info "";
-sharp         -sharp $real_script_name
-sharp         set $real_script_name $fastcgi_script_name;
-sharp         -sharp
-sharp         if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {
-sharp                 -sharp $real_script_name
-sharp                 set $real_script_name $1;
-sharp                 -sharp $path_info
-sharp                 set $path_info $2;
-sharp         }
-sharp         -sharpfastcgi
-sharp         fastcgi_param SCRIPT_FILENAME $document_root$real_script_name;
-sharp         fastcgi_param SCRIPT_NAME $real_script_name;
-sharp         fastcgi_param PATH_INFO $path_info;
-sharp }

location / {

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

    -sharp First attempt to serve request as file, then
    -sharp as directory, then fall back to displaying a 404.
    try_files $uri $uri/ =404;
}

location ~ ^(.+\.php)(.*)$ {
    include snippets/fastcgi-php.conf;
    fastcgi_pass unix:/run/php/php7.0-fpm.sock;

    include fastcgi_params;

    fastcgi_split_path_info       ^(.+\.php)(.*)$;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param PATH_INFO       $fastcgi_path_info;
}

location ~ \.php$ {
    include snippets/fastcgi-php.conf;
    fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}

location ~ /\.ht {
    deny all;
}

Jun.02,2022


server {    
    charset utf-8;    
    client_max_body_size 128M;    
    listen 80;    
    server_name tp5.local.test;    
    root  /home/www/tp5/public;    
    index  index.php;    

    location ~* \.(eot|otf|ttf|woff)$ {    
        add_header Access-Control-Allow-Origin *;    
    }    

    location / {    
        index    index.html index.php;    
        if ( -f $request_filename) {    
            break;    
        } 

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

    location ~ \.php {    
        set $script $uri;    
        set $path_info "";    
        if ($uri ~ "^(.+\.php)(/.+)") {    
            set $script $1;    
            set $path_info $2;    
        }    
    include   fastcgi_params;    
    fastcgi_index    index.php?IF_REWRITE=1;    
    fastcgi_pass   127.0.0.1:9000;    
    fastcgi_param    PATH_INFO    $path_info;    
    fastcgi_param    SCRIPT_FILENAME    $document_root$fastcgi_script_name;    
    fastcgi_param    SCRIPT_NAME    $script;    
    try_files $uri =404;    
    }    
}
Menu