lnmp environment opens pathinfo, supports tp5.0 and other access

 1. Open pathinfo  

#comment the following line
#include enable-php.conf
#load new configuration file
include  enable-php-pathinfo.conf

#Add the following 
        location / {
             if (!-e $request_filename ){
                rewrite ^/(.*)$ /index.php/$1 last;
                break;
            }
        }
        location ~ /index.php {
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  $document_root/index.php;
            include        fastcgi_params;
            fastcgi_param APPLICATION_ENV dev;
        }

 I started to search a lot on the Internet, but it didn't work. Later, I found this. It is effective for personal testing. Save it for easy search.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325158294&siteId=291194637