繁体   English   中英

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

[英]Configuring MNPP nginx.conf to work with Codeigniter/PHP

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

我已经使我的Codeigniter应用程序可以在EC2实例上使用Nginx正常工作,因此Codeigniter应用程序不是问题。

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

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

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

在我的“ / 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;
}

是有效的。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM