代码改变世界

随笔分类 -  nginx

nginx配置支持php的pathinfo模式配置方法

2011-07-29 09:34 by AnyKoro, 370 阅读, 收藏, 编辑
摘要: nginx模式不支持pathinfo模式,类似info.php/hello形式的url会被提示找不到页面。下面的通过正则找出实际文件路径和pathinfo部分的方法,让nginx支持pathinfo。在使用Concrete5 CMS的程序时候,会遇到这种情况。(不过还是推荐apache)nginx配置实例:## 在nginx.conf的server部分:server { listen 80; server_name www.xxx.com xxx.com; location ~ \.php { include sfcgi.conf; include fcgi.conf }}##要点: \.ph 阅读全文
点击右上角即可分享
微信分享提示