dotCloud nginx.conf:如何让“index index.php”指令工作?

时间:2013-01-21 03:10:09

标签: dotcloud

我通过在应用程序目录中“推送”一个nginx.conf文件来获得auth工作,所以我知道该文件有效,但是/ app不会触发/app/php.index。我无法使用php在我的vista笔记本电脑上运行nginx,我无法在dotCloud实例中编辑/etc/nginx/nginx.conf,因为dotCloud因为没有给root而生活困难。

(注意.htpasswd是相对于ngnix.conf文件的位置,很好)。

server { 

location / {
          index  index.php;
}


location /admin {
            auth_basic "enter password";
            auth_basic_user_file .htpasswd;
    index  index.php;
   }


}

1 个答案:

答案 0 :(得分:0)

您可能需要使用nginx指令将请求映射到动态内容。然后,该控制器可以适当地路由它们。

try_files $uri $uri/ /index.php;

有关示例项目,请参阅CakePHP tutorial