【发布时间】:2011-10-02 18:07:29
【问题描述】:
我正在使用 Kohana 3.2 开发一个 Web 应用程序,并加载了以下模块:
- 用户管理员
- 授权
- 数据库
- orm
- 分页
- oauth
- kohana 电子邮件
在我的开发机器(Mac OS X Lion 和 Apache)上一切正常。
在我的运行 ubuntu 10.04 和 nginx 1.1.0 的 Web 服务器上,配置文件未加载。
这在我尝试登录时生效。 Kohana 给我以下错误:
A valid hash key must be set in your auth config.
如果我看一下 Kohana::$config,它是空的。这让我得出结论,我的配置没有加载。
有没有人知道什么会导致这种行为。
我的目录是这样的
application/
├── bootstrap.php
├── cache
├── classes
│ ├── controller
│ │ ├── …
│ └── model
├── config
│ ├── auth.php
│ ├── database.php
│ └── pagination.php
├── i18n
│ └── …
├── logs
│ └── …
├── messages
└── views
└── template
└── default.php
编辑:因为我想错误一定是在我的服务器环境中,这是我的 nginx 配置。
服务器{ 听 80;
root /srv/www/;
index index.php;
location / {
try_files $uri /index.php?$query_string;
}
location /index.php {
fastcgi_param KOHANA_ENV development;
fastcgi_pass unix:/var/run/php-fastcgi/php-fastcgi.socket;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
include /etc/nginx/fastcgi_params;
}
}
【问题讨论】:
标签: nginx kohana config kohana-3