Php 找不到CodeIgniter和Nginx-类

Php 找不到CodeIgniter和Nginx-类,php,codeigniter,nginx,Php,Codeigniter,Nginx,我用Apache将CodeIgniter应用程序从本地主机上传到运行Nginx的服务器上 它可以在我的本地主机和其他使用Apache的服务器上完美地工作 它位于一个子域下,一个域和其他子域100%运行PHP CI中的此应用程序不会启动,PHP将在未编译的情况下返回 这是我在/var/log/nginx/error.log上看到的: 2013/12/05 14:50:31 [error] 20139#0: *1 FastCGI sent in stderr: "PHP message: PHP F

我用Apache将CodeIgniter应用程序从本地主机上传到运行Nginx的服务器上

它可以在我的本地主机和其他使用Apache的服务器上完美地工作

它位于一个子域下,一个域和其他子域100%运行PHP


CI中的此应用程序不会启动,PHP将在未编译的情况下返回

这是我在/var/log/nginx/error.log上看到的:

2013/12/05 14:50:31 [error] 20139#0: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Class 'M_website' not found in /home/webroot/domain.com/cms/system/core/Loader.php on line 303" while reading upstream, client: 84.91.4.220, server: cms.domain.com, request: "GET /websites HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "cms.domain.com"
在/home/webroot/domain.com/cms/system/core/Loader.php中找不到类“M_网站”

这是我的子域配置

server
{
    server_name cms.domain.com;
    access_log /var/log/nginx/cms.domain.access.log;
    root /home/webroot/domain.com/cms;

    index index.php index.html index.htm;

    if (!-e $request_filename) {
            rewrite ^.*$ /index.php last;
    }

    # enforce NO www
    if ($host ~* ^www\.(.*))
    {
        set $host_without_www $1;
        rewrite ^/(.*)$ $scheme://$host_without_www/$1 permanent;
    }

    # canonicalize codeigniter url end points
    # if your default controller is something other than "welcome" you should change the following
    if ($request_uri ~* ^(/websites/(/index)?|/index(.php)?)/?$)
    {
        rewrite ^(.*)$ / permanent;
    }

    # removes trailing "index" from all controllers
    if ($request_uri ~* index/?$)
    {
        rewrite ^/(.*)/index/?$ /$1 permanent;
    }

    # canonicalize codeigniter url end points
    # if your default controller is something other than "welcome" you should change the following
    if ($request_uri ~* ^(/websites/(/index)?|/index(.php)?)/?$)
    {
        rewrite ^(.*)$ / permanent;
    }

    # removes trailing "index" from all controllers
    if ($request_uri ~* index/?$)
    {
        rewrite ^/(.*)/index/?$ /$1 permanent;
    }

    # removes trailing slashes (prevents SEO duplicate content issues)
    if (!-d $request_filename)
    {
        rewrite ^/(.+)/$ /$1 permanent;
    }

    # removes access to "system" folder, also allows a "System.php" controller
    if ($request_uri ~* ^/system)
    {
        rewrite ^/(.*)$ /index.php?/$1 last;
        break;
    }

    # unless the request is for a valid file (image, js, css, etc.), send to bootstrap
    if (!-e $request_filename)
    {
        rewrite ^/(.*)$ /index.php?/$1 last;
        break;
    }

    # catch all
    error_page 404 /index.php;

    # use fastcgi for all php files
    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_pass unix:/var/run/php5-fpm.sock;
            fastcgi_index index.php;
            include fastcgi_params;
    }

    # deny access to apache .htaccess files
    location ~ /\.ht
    {
        deny all;
    }

}
为什么会有问题

CI文件以

<?

“PHP未经编译即返回”--嗯,什么?我看到了源代码!:(如果我删除所有CI脚本等,并在index.php中放入一个简单的脚本,它会工作…您的子域在Ngnix上的外观如何?tnks user1190992。问题已经用它进行了更新。我能够解决问题。CI文件是从开始的,这就是我们在这里的原因:)
<?php
service php5-fpm restart