RockMongo

    This sections describes how to access your RockMongo installation.

    RockMongo is a MongoDB administration tool, written in PHP5.

    Increasing the security of RockMongo login page.

     
    If you would like, you can add an additional layer of security by enabling Apache's authentication when accessing RockMongo. To do so, open /installdir/apps/rockmongo/conf/httpd-app.conf and uncomment the following lines by removing the # symbol:
     
    For Virtual Appliances and AMIs you can edit the file with "nano":
    $ sudo nano /opt/bitnami/apps/rockmongo/conf/httpd-app.conf
    # AuthType Basic
    # AuthName RockMongo
    # AuthUserFile "install_directory/apache2/users"
    # Require valid-user
    
     
    Now, when accessing RockMongo you will have to log in twice: First, with the username administrator and second, with the username root. Password will be the one you specified at install time or in the case of the Amazon Machine Images and Virtual Appliances, "bitnami". If you would like to change this password, you just have to follow these instructions.

    How to modify the allowed size for uploaded files?

    You can modify the following option in the php.ini file to increase the allowed size for uploads:

    ; Maximum size of POST data that PHP will accept.
    post_max_size = 16M
    
    ...
    
    ; Maximum allowed size for uploaded files.
    upload_max_filesize = 16M
    

    If you have enabled PHP-FPM (enabled by default in Cloud Images and VMs) you need to restart PHP-FPM running the following command:

    sudo /opt/bitnami/ctlscript.sh restart php-fpm
    

    Note: For native installers replace /opt/bitnami with your current installation directory.

    Otherwise, you need to restart the Apache server:

    sudo YOUR_INSTALLATION_DIRECTORY/ctlscript.sh restart apache

    How to modify the execution time?

    This paremeter sets the timeout for Apache to run a script. You can modify the following option in the php.ini file.

    max_execution_time = 120     ; Maximum execution time of each script, in seconds 
    

    How to change the RockMongo password?

    The RockMongo credentials are the same that the MongoDB database. If you want to modify the password, check how to change the MongoDB root password.

    How to enable RockMongo to be accessed remotely?

    For security reasons, RockMongo is only accessible when using 127.0.0.1 as the hostname.To access it from a remote system, you must create an SSH tunnel that routes requests to the Apache Web server from 127.0.0.1. This implies that you must have an SSH private key and be able to connect to your server over SSH in order to access this application remotely.

    IMPORTANT: Before following the steps below, ensure that your Apache and MongoDB servers are running.

     

    NOTE: The steps below suggest using port 8888 for the SSH tunnel. If this port is already in use by another application on your local machine, replace it with any other port number greater than 1024 and modify the steps below accordingly. Similarly, if you have enabled Varnish, your stack's Apache Web server might be running on port 81. In this case, modify the steps below to use port 81 instead of port 80 for the tunnel endpoint.

    Cloud Images

    On Windows:

    • Make sure you can log in to the server using PuTTY. Refer to your cloud platform's page in this wiki for more information.
    • Open a new SSH session to the server and in the PuTTY settings for the new session, click "Connection → SSH → Tunnels" section and create a secure tunnel for the RockMongo application by forwarding source port "8888" to destination port "localhost:80".
    • Click the "Add" button to add the secure tunnel configuration to the session.

    • Go back to the "Session" section and save your changes by clicking the "Save" button.
    • Click the "Open" button to open a new SSH session to the server.

    On Linux and Mac OS X:

    • Make sure you can log in to the server using SSH. Refer to your cloud platform's page in this wiki for more information.
    • If you have a private key file for your cloud server, open a new SSH session to the server using the following command:
    $ ssh -N -L 8888:127.0.0.1:80 -i bitnami-hosting.pem bitnami@xyz.bitnamiapp.com
    

    Remember to replace 'bitnami-hosting.pem' in the previous commands with the path to your private key file, and 'xyz.bitnamiapp.com' with the public IP address or hostname of your server. Note that if successful, this command will create an SSH tunnel but will not display any output on the server console.

    • If you use an SSH username/password pair to access your cloud server, open a new SSH session to the server using the following command:
    $ ssh -N -L 8888:127.0.0.1:80 bitnami1@xyz.cloudapp.net

    Remember to replace 'bitnami1' with the SSH username from your credentials pair and 'xyz.cloudapp.net' with the public IP address or hostname of your server. Note that if successful, this command will create an SSH tunnel but will not display any output on the server console.

    While the tunnel is active, you should be able to access RockMongo through the secure SSH tunnel you created, by browsing to http://127.0.0.1:8888/rockmongo.

    To log in, use username 'root'. For the application password, refer to the detail page for your cloud server.

    Virtual Machine

    On Windows:

    • Make sure you can log in to the server using PuTTY. Refer to these instructions for more information.
    • Open a new SSH session to the server and in the PuTTY settings for the new session, click "Connection → SSH → Tunnels" section and create a secure tunnel for the RockMongo application by forwarding source port "8888" to destination port "localhost:80".
    • Click the "Add" button to add the secure tunnel configuration to the session.

    • Go back to the "Session" section and save your changes by clicking the "Save" button.
    • Click the "Open" button to open a new SSH session to the server.

    On Linux and Mac OS X:

    $ ssh -N -L 8888:127.0.0.1:80 bitnami@192.168.1.1
    

    Remember to replace '192.168.1.1' with the network IP address or hostname of your virtual server. Note that if successful, this command will create an SSH tunnel but will not display any output on the server console.

    While the tunnel is active, you should be able to access RockMongo through the secure SSH tunnel you created, by browsing to http://127.0.0.1:8888/rockmongo.

    To log in, use username 'root'. The default password is 'bitnami'.

    Alternative Approach: Allow Access from All Hosts

    Alternatively, if you are running the virtual machine in a secure environment, you can enable access to RockMongo from hosts other than 127.0.0.1 by editing the /opt/bitnami/apps/rockmongo/conf/httpd-app.conf file and modifying the Allow and Require directives as below:

      Default directive Modified directive
    Apache 2.2 Allow from 127.0.0.1 Allow from all
    Apache 2.4+ Require local Require all granted

    You can also use the example configuration file below if you wish:

    <Directory "/opt/bitnami/apps/rockmongo/htdocs">
    # AuthType Basic                                                                                                                                          
    # AuthName RockMongo                                                                                                                                     
    # AuthUserFile "/opt/bitnami/apache2/users"                                                                                           
    # Require valid-user                                                                                                                                      
      <IfVersion < 2.3 >
      Order allow,deny
      Allow from all
      Satisfy all
      </IfVersion>
      <IfVersion >= 2.3>
      Require all granted
      </IfVersion>
      ErrorDocument 403 "For security reasons, this URL is only accesible using localhost (127.0.0.1) as the hostname"
    </Directory>
    

    Restart Apache to have the changes take effect:

    $ cd /opt/bitnami
    $ sudo ./ctlscript.sh restart apache
    

    You should now be able to access RockMongo by browsing to http://[virtual-machine-IP-address]/rockmongo.

    To log in, use username 'root'. The default password is 'bitnami'.

    Native Installer

    You should be able to access RockMongo directly, by browsing to http://127.0.0.1:8080/rockmongo or http://127.0.0.1/rockmongo.

    The username is 'root', and the password is the one specified by you during the installation process.

    Tabs end

    Here is an example of what you should see:

    rockmongo-1.png

    Tag page (Edit tags)
    • No tags
    Pages that link here
    Page statistics
    29605 view(s), 11 edit(s) and 11836 character(s)

    Comments

    You must login to post a comment.

    Attach file

    Attachments