1

我有一个标准的 Codeigniter 安装,但似乎无法让MNPP (MySQL+Nginx+PHP+Python)识别它。我看到 MNPP 的公共文件夹中有一个 codeigniter 配置,但也无法让 MNPP 使用这些设置。

我已经让我的 Codeigniter 应用程序在 EC2 实例上使用 Nginx 工作,所以我的 Codeigniter 应用程序没有问题。

我也可以在 MNPP 上提供 PHP 页面、MySQL 和 memcache,所以这些也不是问题。有人可能会提出一些建议来指引我正确的方向吗?

仅供参考,这是我的 MNPP /Applications/MNPP/conf/nginx/nginx.conf 文件:https ://gist.github.com/3711660 ,为简单起见,我已将其配置为仅包含我的 /Applications/MNPP/conf/ nginx/sites-enabled/默认文件:https ://gist.github.com/3711653

4

1 回答 1

1

哇,这很简单。我回答了我自己的问题。

在我的“/Applications/MNPP/conf/nginx/sites-enabled/default”文件中,我需要做的就是切换 index.html 和 index.php b/c 的顺序 nginx 试图首先服务 index.html 和 b /c 提供了一个 index.html 页面,但它从未看到我的 codeigniter 应用程序 PHP 页面。

所以改变这个:

location / {
    root   /Applications/MNPP/Library/nginx/html;
    index  index.html index.php  index.htm;
}

对此:

    location / {
    root   /Applications/MNPP/Library/nginx/html;
    index  index.php index.html index.htm;
}

是什么工作。

于 2012-09-13T03:50:24.763 回答