Board logo

标题: CI框架无法使用PATHINFO模式 [打印本页]

作者: codingOnTheWay    时间: 2013-1-9 14:09     标题: CI框架无法使用PATHINFO模式

大家好,我在CentOS.6.3上跑的CI框架,用的是LANMP的集成开发环境,其中使用的是Nginx做80端口的管理,Apache做8080端口的管理,但是在遇到诸如http://localhost/CI/index.php/hello/index这样的URL时就会显示404页面,也就是说当前的设置不支持PATHINFO模式的URL访问,刚遇到的这个问题在网上看了不少资料,都不能实际解决问题,特来WD论坛来求助,希望有类似的经历的同志指点一些迷津 。急!急!急!
作者: admin    时间: 2013-1-9 20:13

支持PATHINFO,配置下apache就可以
作者: codingOnTheWay    时间: 2013-1-10 18:14

为什么NGINX不支持PATHINFO,要去设置的额是apache呢?设置apache又怎么设置呢
作者: admin    时间: 2013-1-10 21:26

nginx也支持,都是要设置一下就可以,具体GG
作者: codingOnTheWay    时间: 2013-1-10 22:21

追问:我重装过Wdlinux目录下有lanmp和wdlinux两个文件,里面都有Ngix.conf文件,请问配置哪一个?
作者: admin    时间: 2013-1-11 09:16

wdlinux
作者: codingOnTheWay    时间: 2013-1-11 09:50

我在GG和百度上都查了,但我的wdlinux下面有两个文件:nginx && nginx-1.0.12,把里面的nginx.conf文件都加上了下面的代码:结果还是不行,请问这是为什么?
    server {
            listen       80;
            server_name  localhost;
            index index.html index.htm index.php;
            root   /xampp/htdocs;
            autoindex on;

   location ~ \.php($|/) {
                 root           /www/web/default/;
  
                 fastcgi_pass   127.0.0.1:9000;
                 fastcgi_index  index.php;
                 fastcgi_param  SCRIPT_FILENAME  E:/www$fastcgi_script_name;
                 fastcgi_split_path_info ^(.+\.php)(.*)$;   
                 fastcgi_param PATH_INFO $fastcgi_path_info;   
                 include        fastcgi_params;
        }
            log_format  access  '$remote_addr - $remote_user [$time_local] "$request" '
                 '$status $body_bytes_sent "$http_referer" '
                 '"$http_user_agent" $http_x_forwarded_for';
            access_log  /APMServ5.2.6/nginx/logs/access.log  access;
        }
    }




欢迎光临 WDlinux官方论坛 (http://www.wdlinux.cn/bbs/) Powered by Discuz! 7.2