nginx下的tp3.1.3可正常打开所有链接:

nginx下的tp3.2.3会有上述问题:

nginx 的 conf有问题吗?
server{
listen 80;
#listen [::]:80;
server_name zq.xxx.cn;
index index.html index.htm index.php default.html default.htm default.php;
root /data/www/thinkphp/;
include other.conf;
error_page 404 /404.html;
if (!-e $request_filename){
rewrite ^/(.*)$ /index.php/$1 last;
break;
}
location ~ \.php
{
#comment try_files $uri =404; to enable pathinfo
try_files $uri =404;
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
#include pathinfo.conf;
#定义变量 $path_info
set $path_info "";
#定义变量 $real_sc
set $real_sc
#如果地址与引号内的正则表达式匹配
if ($fastcgi_sc
#将文件地址赋值给变量 $real_sc
set $real_sc
#将文件地址后的参数赋值给变量 $path_info
set $path_info $2;
}
#配置fastcgi的一些参数
fastcgi_param sc
fastcgi_param sc
fastcgi_param PATH_INFO $path_info;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
access_log /mnt/data/wwwlogs/zq.log access;
}
项目里面的config应该没问题吧!
<?php
return array(
'URL_MODEL' => 2, // URL访问模式,可选参数0、1、2、3,代表以下四种模式:
// 0 (普通模式); 1 (PATHINFO 模式); 2 (REWRITE 模式); 3 (兼容模式)
'MODULE_ALLOW_LIST' => array('Admin','Web'),
'DEFAULT_MODULE'=>'Web',//默认模板
//'APP_USE_NAMESPACE' => false, // 应用类库是否使用命名空间
'SHOW_PAGE_TRACE' => true, //显示页面跟踪
'TMPL_ACTION_ERROR' => 'Public:jump',//默认错误跳转对应的模板文件
'TMPL_ACTION_SUCCESS' => 'Public:jump',//默认错误跳转对应的模板文件
);
最佳答案