How lnmp.org changes the pathinfo mode of tp6.0 framework

Time:2021-7-3

A lot of them didn’t work on the Internet. After a day’s work, I finally tried. I just need to change one
Change include enable-php.conf to include enable-php-pathinfo.conf
Then LNMP restart

This is the configuration text of nginx.conf file after one click installation

server
 { listen 443 ssl;
 listen 80 default_server;
 #listen [::]:80 default_server ipv6only=on;
 server_ name _;# Write your own domain name
 index index.html index.htm index.php;
 root /home/wwwroot/default;
 #error_page   404   /404.html;
 # Deny access to PHP files in specific directory #location ~ /(wp-content|uploads|wp-includes|images)/.*.php$ { deny all; }
 include enable-php.conf;# This is the replacement: change include enable-php.conf to include enable-php-pathinfo.conf
 location /nginx_status
 {
 stub_status on;
 access_log off;
 }
 location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$
 {
 expires 30d;
 }
 location ~ .*.(js|css)?$
 {
 expires 12h;
 }
 location ~ /.well-known {
 allow all;
 }
 location ~ /.
 {
 deny all;
 }
 access_log /home/wwwlogs/access.log;
 }

And then it’s ready!

How lnmp.org changes the pathinfo mode of tp6.0 framework