【发布时间】:2011-09-22 04:47:40
【问题描述】:
我有安装了 nginx-gridfs 模块 v0.8 的 nginx 版本 1.0.6。我在 mongohq 上有一个测试帐户,名为 mongodb://:@staff.mongohq.com:20127/Test
我将 conf 中的 location 属性设置为
location /gridfs/ {
gridfs Test field=_id
type=objectid
user=<user>
pass=<password>;
mongo staff.mongohq.com:20127;
}
当我启动 nginx 时,我得到了以下异常并且没有工作进程可以启动。
Mongo 异常:连接失败。
谁能告诉我我做错了什么?
谢谢
【问题讨论】:
-
你的 nginx 配置文件看起来不错。我认为问题在于,无论运行这个 nginx 服务器的任何服务器,都无法通过
<user>和<password>访问位于staff.mongohq.com:20127的 mongo 服务器。我建议仔细检查这些设置。 -
我尝试做 mongo staff.mongohq.com:20127/Test -u
-p 我能够连接 mongo 客户端