簡體   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