关于Linux开启pathinfo,lnmp开启pathinfo

在/usr/local/里面,你能找到PHP文件件和nginx文件夹

在/usr/local/php/etc/

更改php.ini

找到:cgi.fix_pathinfo=0

更改为:cgi.fix_pathinfo=1

在/usr/local/nginx/conf/

修改nginx对应配置文件
去掉include pathinfo的#,在try_files前加#;
重启lnmp

/root/lnmp restart


如果你绑定了多个域名,多站点,请修改

/usr/local/nginx/conf/vhost/里面的,你绑定的域名的文件

修改nginx对应配置文件
去掉include pathinfo的#,在try_files前加#;
重启lnmp

/root/lnmp restart



猜你喜欢

转载自blog.csdn.net/chen110710/article/details/46463387