关于php:lnmporg如何更改TP60框架的pathinfo模式

网上好多都不论用,搞了一天,最初尝试了一下,只须要改一个就好了.
将include enable-php.conf 改为 include enable-php-pathinfo.conf即可
而后 lnmp restart

这是一键装置后的 nginx.conf 文件的配置原文

server
 { listen 443 ssl;
 listen 80 default_server;
 #listen [::]:80 default_server ipv6only=on;
 server_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;#这是替换的中央:将include enable-php.conf 改为 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;
 }

而后就好了!

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理