在配置使用 nginx-gridfs 来直接读取 mongodb gridfs 存储的图片, 但是用 user/pass nginx 出错, 试过用 db 的密码:Invalid mongo user/pass 和 admin 的密码:Authentication Required
location /asset/ {
gridfs site_production field=filename type=string user=*** pass=***;
mongo 127.0.0.1:27017;
}
2012/03/24 02:47:31 [error] 683#0: Invalid mongo user/pass: ***/***
2012/03/24 02:47:31 [error] 682#0: Invalid mongo user/pass: ***/***
2012/03/24 02:47:31 [error] 684#0: Invalid mongo user/pass: ***/***
2012/03/24 02:47:31 [error] 681#0: Invalid mongo user/pass: ***/***
2012/03/24 02:47:31 [alert] 324#0: worker process 683 exited with fatal code 2 and cannot be respawned
2012/03/24 02:47:31 [alert] 324#0: worker process 682 exited with fatal code 2 and cannot be respawned
2012/03/24 02:47:31 [alert] 324#0: worker process 684 exited with fatal code 2 and cannot be respawned
2012/03/24 02:47:31 [alert] 324#0: worker process 681 exited with fatal code 2 and cannot be respawned
不用则 OK,什么个情况? (我说的不用是指注释了 monogodb.conf #auth=true)
location /asset/ {
gridfs site_production field=filename type=string;
mongo 127.0.0.1:27017;
}