jasonshaw 发表于 2010-5-7 22:28:34

准备学习ci,但是第一个blog就因为不知道如何配置而搁浅

nginx下需要什么特别的配置才能使用CI吗?
根本就无法运行,指南中的 blog hello world

Hex 发表于 2010-5-7 23:18:44

手册都是以 apache 为主要服务器的,nginx 当然不行了,不过你为什么要用 nginx 呢?

jasonshaw 发表于 2010-5-8 12:24:57

回复 2# Hex


   
速度快,系统消耗低

而且 我即使用了 apache 也是一样不行的,虽然不是nginx的404 not found但是也是object not found

Apache我用的是 张宴的 APMServ v5.2.6 非常好用,只有CI上去搁浅了

saturn 发表于 2010-5-8 12:44:26

我觉得你首先应该学会的一项编程技术和思路,比如CI下的blog。然后再试图将其部署到ngix。

一个麻烦问题,不管大小,都应该分解成多个步骤。

Ref:http://route19.com/logbook/view/codeigniter-urls-nginx

出现object not found,应该还是PATH_INFO的问题。请google。

jasonshaw 发表于 2010-5-8 14:30:38

本帖最后由 jasonshaw 于 2010-5-8 14:32 编辑

回复 4# saturn


    不知道是NPMserv0.5.0的问题还是其他的,按照上面提供的链接没成功。

不过却安装hex提供的页面,修改为:
server {
    listen       80;
    server_namelocalhost;
    location / {
      root   D:/programming/NPMserv/www;
      indexindex.html index.htm index.php default.php;
    }
    error_page   500 502 503 504/50x.html;
    location = /50x.html {
      root   html;
    }
    location ~ .*\.php {
      root         D:/programming/NPMserv/www;
      fastcgi_pass   127.0.0.1:9000;
      fastcgi_indexindex.php;
      set $path_info "";
      set $real_script_name $fastcgi_script_name;
            if ($fastcgi_script_name ~ "^(.+?.php)(/.+)$") {
               #set $real_script_name $1;
               set $path_info $2;
            }
      fastcgi_param PATH_INFO $path_info;
      fastcgi_paramSCRIPT_FILENAMED:/programming/NPMserv/www$fastcgi_script_name;
      include      fastcgi_params;
    }
}


现在可以打开blog 页面 但是不是指南中给出的地址 用http://localhost/ci/index.php/blog是可以的,但是http://localhost/ci/index.php/blog/ 是404 not found

不知道是不是会造成影响,如果会的话,那应该怎么操作?
页: [1]
查看完整版本: 准备学习ci,但是第一个blog就因为不知道如何配置而搁浅