xy631606923 发表于 2012-6-11 19:13:54

http://www.exam.com/index.php/welcome/index CI框架在NGINX服务器报404?

http://www.exam.com/index.php/welcome/index 为什么nginx 服务器报404   解析不了url呢:L

xy631606923 发表于 2012-6-11 19:57:22

现在首页框架下载的有问题 URL 解析有BUG 我用以前下载的框架资源没有问题了

lou0011 发表于 2012-6-12 09:41:30

应该是服务器配置的问题

GLI8 发表于 2012-6-12 21:11:26

同问啊 一样

GLI8 发表于 2012-6-12 21:47:25

http://www.php100.com/html/itnews/PHPxinwen/2011/0705/8401.html
这个链接里可以解决问题的 估计就是 PATH_INFO的问题

xy631606923 发表于 2012-7-4 15:47:25

谢谢各位 解决了 是nginx 默认不支持path_info 模式现已解决!

xy631606923 发表于 2012-7-4 15:51:12

fastcgi.conf 内容

fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
##########################################pathinfo 模式
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 SCRIPT_FILENAME $document_root$real_script_name;
fastcgi_param SCRIPT_NAME $real_script_name;
fastcgi_param PATH_INFO $path_info;
##########################################nginx支持pathinfo 模式的重点
fastcgi_paramGATEWAY_INTERFACECGI/1.1;
fastcgi_paramSERVER_SOFTWARE    nginx/$nginx_version;

fastcgi_paramQUERY_STRING       $query_string;
fastcgi_paramREQUEST_METHOD   $request_method;
fastcgi_paramCONTENT_TYPE       $content_type;
fastcgi_paramCONTENT_LENGTH   $content_length;
fastcgi_paramREQUEST_URI      $request_uri;
fastcgi_paramDOCUMENT_URI       $document_uri;
fastcgi_paramDOCUMENT_ROOT      $document_root;
fastcgi_paramSERVER_PROTOCOL    $server_protocol;


fastcgi_paramREMOTE_ADDR      $remote_addr;
fastcgi_paramREMOTE_PORT      $remote_port;
fastcgi_paramSERVER_ADDR      $server_addr;
fastcgi_paramSERVER_PORT      $server_port;
fastcgi_paramSERVER_NAME      $server_name;

fastcgi_param PATH_INFO         $path_info;

# PHP only, required if PHP was built with --enable-force-cgi-redirect
#fastcgi_paramREDIRECT_STATUS    200;

nginx.conf 内容如下

#user         nobody;
    worker_processes1;

    #error_loglogs/error.log;
    #error_loglogs/error.lognotice;
    #error_loglogs/error.loginfo;

    pid      logs/nginx.pid;


    events {
      worker_connections1024;
    }


    http {
      include       mime.types;
      default_typeapplication/octet-stream;

      log_formatmain'$remote_addr - $remote_user [$time_local] "$request" '
                        '$status $body_bytes_sent "$http_referer" '
                        '"$http_user_agent" "$http_x_forwarded_for"';

      #access_loglogs/access.logmain;

      sendfile      on;
      #tcp_nopush   on;

      #keepalive_timeout0;
      keepalive_timeout65;

      gzipon;
        #包含虚拟目录配置
      include vhost.conf;
    }
vhost.conf 内容如下

#phpMyAdmin
server {
      listen      80;
      server_name www.phpmyadmin.com;
      index       index.php index.html index.htm;
      root      "/servers/apps/phpMyAdmin";

      location ~ \.php{
            include      fastcgi.conf;
      }
}
#CI
server {
      listen      80;
      server_name www.ci.com;
      index       index.php index.html index.htm;
      root      "/servers/apps/CI";
      location ~ \.php{
               
           include fastcgi.conf;
       }      
}
页: [1]
查看完整版本: http://www.exam.com/index.php/welcome/index CI框架在NGINX服务器报404?