nginx mongodb相关配置

mongdb外部访问:
redis01:/root# /usr/local/mongodb/bin/mongod --bind_ip 192.168.32.34 -f /usr/local/mongodb/bin/mongodb.conf 
about to fork child process, waiting until server is ready for connections.
forked process: 1403
all output going to: /usr/local/mongodb/logs/mongodb.log




redis01:/root# mongofiles put q.jpg -h192.168.32.34 -db pics -t jpg
connected to: 192.168.32.34
added file: { _id: ObjectId('56a87ec80004fad5d9bdae4a'), filename: "q.jpg", chunkSize: 262144, uploadDate: new Date(1453883081024), md5: "196fea5be1558e28067d7e1e2c1ebc0d", length: 79398, contentType: "jpg" }
done!
redis01:/root# 

redis01:/root# cat /usr/local/mongodb/bin/mongodb.conf 
dbpath=/usr/local/mongodb/db
logpath=/usr/local/mongodb/logs/mongodb.log
port=27017
fork=true
nohttpinterface=true
redis01:/root# 

        }
   location /pics/ {
          gridfs pics field=filename type=string;
		   mongo 192.168.32.34:27017;
       }

你可能感兴趣的:(mongodb)