zoukankan      html  css  js  c++  java
  • nginx + php-fpm 开启 PATH_INFO 模式

    很多框架默认路由都是 PATH_INFO 模式,比如默认在 Apache 并且没有 rewrite 时,CodeIgniter 一般可以这样访问 /index.php/controller/action ,那么 nginx 和 php-fpm 如何设置支持 PATH_INFO 模式呢?

    php.ini 中一个与 PATH_INFO 有关的设置是 cgi.fix_path 默认为 1,我们将其设置为 0。

    php.ini 设置:

    接下来是 nginx 配置:

  • 相关阅读:
    二、Elasticsearch核心配置文件详解
    javax.mail.AuthenticationFailedException: 535 authentication failed
    Java compiler level does not match the version of the installed java project facet
    一、设置cookie报非法参数异常
    slf4j的使用规范
    基于token的身份验证JWT
    单点登录
    spring的bean不能注入原因分析
    规避空指针异常规范
    Git远程操作详解
  • 原文地址:https://www.cnblogs.com/surplus/p/15340939.html
Copyright © 2011-2022 走看看