配置MNPP nginx.conf以使用Codeigniter/PHP


Configuring MNPP nginx.conf to work with Codeigniter/PHP

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

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

此外,我可以在MNPP上提供PHP页面、MySQL和memcache,所以这些也不是问题所在。有人能给我一些建议吗?

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

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

在我的"/Applications/MNPP/conf/nginx/sites-enabled/default"文件中,我所需要做的就是切换index.html和index.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;
}

就是这样。