2012-09-13 03:39
采纳率: 0%
浏览 66

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

I have a standard Codeigniter installation but can't seem to get MNPP (MySQL+Nginx+PHP+Python) to recognize it. I saw there is a codeigniter config in MNPP's common folder but can't get MNPP make use of those settings either.

I've gotten my Codeigniter app to work using Nginx on an EC2 instance so its not a problem with my Codeigniter app.

Also I can serve PHP pages, do MySQL and memcache on MNPP so those aren't the issue either. Might one suggest something to point me in the right direction?

FYI, here's my MNPP /Applications/MNPP/conf/nginx/nginx.conf file: https://gist.github.com/3711660 which for the sake of simplicity I have configured to ONLY include my /Applications/MNPP/conf/nginx/sites-enabled/default file : https://gist.github.com/3711653

图片转代码服务由CSDN问答提供 功能建议

我有一个标准的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 / default file: https://gist.github.com/3711653

  • 写回答
  • 好问题 提建议
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • dony39517 2012-09-13 03:50

    Wow, that was simple. I answered my own question.

    In my "/Applications/MNPP/conf/nginx/sites-enabled/default" file all I need to do was switch the order of index.html and index.php b/c nginx was trying to serve index.html first and b/c there was an index.html page that was served and it never saw my codeigniter app PHP pages.

    So changing this:

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

    to this:

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

    is what worked.

    解决 无用
    打赏 举报

相关推荐 更多相似问题