System Admin

MongoDB GUI Admin With Rockmongo on Nginx

A few projects and tools require mongodb. If you don't have the command prompt handy at all times or don't want to memorize all of that stuff you can use one of the best GUI tools for MongoDB: RockMongo.

  • cd /var/www/tools/
  • git clone rockmongo

Setup a vhost (for nginx)

server {
listen 80;
server_name rockmongo;
access_log /var/log/nginx/mongo-access.log;
error_log /var/log/nginx/mongo-error.log;

# root directive should be global
root /var/www/tools/rockmongo;
index index.php;

location / {
try_files $ uri $ uri/ /index.php?$ uri&$ args;

location ~ .php$ {
try_files $ uri =404;
include /etc/nginx/fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $ document_root$ fastcgi_script_name;

######## GZIP ########
location ~* ^.+.(jpg|gif|png|jpeg|css|js|swf|ico)$ {
gzip on;
gzip_disable “MSIE [1-6].”;
gzip_types text/css application/x-javascript;
root /var/www/tools/rockmongo;
expires 3d;
#expires max;
set $ control public;
if ($ uri ~* ^.+.(js|css)$ ) {
set $ control private;
access_log off;
add_header Cache-Control $ control;

I setup a shortcut in my host file to access this easily (my use case was local):

  • rockmongo

When you load up the page the first time your login/password is admin/admin



Related Articles

One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *