How does nginx configure thinkphp access routing?

the local environment I use is: upupw
now that the routing is configured, there is an access error, saying that the file cannot be found and a 404 error is reported.
how should I configure it in nginx?

The

address is as follows: http://localhost/index.php/ne. so that you can access
I want to remove the index.php in the middle, but the setting nginx has been invalid
the pseudo-static setting has been done according to someone else"s, which is useless and has been going on all afternoon.

Feb.28,2022

Add
location / {

to the server of

nginx

 try_files $uri $uri/ /index.php?$query_string;

}
rewrite url. Restart nginx, after
is finished. Make sure the port number is not misspelled.


location ~ \.php {
    -sharpfastcgi_pass remote_php_ip:9000;
    fastcgi_pass unix:/dev/shm/php-cgi.sock;
    fastcgi_index index.php;
    set $real_script_name $fastcgi_script_name;                                                                                                                                                                                                                       
    if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {                                                                                                                                                                                                             
        set $real_script_name $1;
        -sharpset $path_info $2;
    }
    fastcgi_param SCRIPT_FILENAME $document_root$real_script_name; 
    fastcgi_param SCRIPT_NAME $real_script_name;
    -sharpfastcgi_param PATH_INFO $path_info;
    if (!-e $request_filename) {
        rewrite ^(.*)$ /index.php?s=$1 last;
        break;
    }
}
Menu