环境使centos7使用lnmp一键安装,在未改动默认配置的情况下,使用Thinkphp5,无法访问路由。
请求www.xx.com/index.php/admin/index/index,总是出现404错误。
原因为:无法加载pathinfo
解决办法:
在nginx.conf(/usr/local/nginx/conf)中,
将原先的‘include enable-php.conf’注释掉,
更改为‘include enable-php-pathinfo.conf;’即可。

thinkphp的话可能需要 include rewrite/thinkphp.conf;

Nginx(nginx一键安装)thinkphp5路由无法访问

相关文章:

  • 2022-12-23
  • 2022-01-03
  • 2021-07-08
  • 2021-07-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-16
猜你喜欢
  • 2022-12-23
  • 2021-10-16
  • 2021-09-29
  • 2021-10-15
  • 2021-06-09
  • 2021-06-13
  • 2022-12-23
相关资源
相似解决方案