drl6054 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

  • 写回答

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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何使用simulink建立一个永磁同步直线电机模型?
  • ¥30 天体光谱图的的绘制并得到星表
  • ¥15 PointNet++的onnx模型只能使用一次
  • ¥20 西南科技大学数字信号处理
  • ¥15 有两个非常“自以为是”烦人的问题急期待大家解决!
  • ¥30 STM32 INMP441无法读取数据
  • ¥15 R语言绘制密度图,一个密度曲线内fill不同颜色如何实现
  • ¥100 求汇川机器人IRCB300控制器和示教器同版本升级固件文件升级包
  • ¥15 用visualstudio2022创建vue项目后无法启动
  • ¥15 x趋于0时tanx-sinx极限可以拆开算吗