Bitnami Ruby Stack

    Bitnami Ruby Stack greatly simplify the development and deployment of Ruby on Rails and its runtime dependencies. It includes ready-to-run versions of Ruby, Rails, MySQL, Git, Subversion, RVM and other components.

    How do I download and install Ruby Stack?

    rubystack-stack-icon.pngYou can download Bitnami Ruby Stack for your platform at http://bitnami.com/stack/ruby There are installers available for Windows, OS X and Linux operating systems. Currently there are available three different versions of Ruby Stack:

    - 1.8.7: This version install latest version of Ruby 1.8.x and Rails 2.3.x

    - 1.9.3: This version ship latest version of Ruby 1.9.x and Rails 3.2.x

    2.0.0: This version ship latest version of Ruby 2.0.x and Rails 4.0.x

     

    These Stacks also include RVM and it is possible to install any Ruby version on top of any of these Stacks. Check the RVM guide to know how to install it.

     

    Bitnami Ruby Stack can also be deployed as virtual machines. If you are using the virtual machine, please see our Virtual Appliances documentation for instructions on logging into the machine.

    The Stacks can be also deployed as AMIs in the Amazon cloud. Please take a look at our Amazon Cloud Images quick guide to see how to connect to the instance from your machine.

    Bitnami Ruby Stack is distributed free of charge under the Apache 2.0 license.

    Which components are installed with Ruby Stack?

    The Bitnami Ruby Stack ships the components listed below. If you want to know which specific version of each component is bundled in the stack you are downloading, check the README.txt file in the download page or in the Stack installation directory. You can also find more information about each component using the links below.

    Main components:

    Dependencies and additional components:

    • Varnish proxy cache server
    • ImageMagick tool
    • SQLite database
    • ModSecurity module
    • XDebug module
    • Xcache module
    • OAuth module
    • Memcache module
    • FastCGI module
    • APC module
    • GD library
    • OpenSSL library
    • CURL library
    • OpenLDAP library
    • PEAR and PECL package manager tools

    What is the default installation directory?

    When using native installers the default installation directory depends on the platform and can be changed during the installation:

    win_platform.png On Windows: C:\BitNami\rubystack-VERSION (On previous versions, the default installation directory was C:\Program Files\BitNami Ruby Stack)

    mac_platform.png On OS X: /Applications/rubystack-VERSION

    linux_platform.png On Linux: /home/user/rubystack-VERSION

    If you are using a virtual machine or the AMI, the default installation directory is "/opt/bitnami".

    How do I start and stop the servers?

    Each Ruby Stack ships several servers that must be started before you will be able to work with them. By default, MySQL database and Apache servers are started after the installation.

    Graphical tool

    The native installers include a graphical tool to manage the servers easily. You can find the "manager-windows.exe", "manager-osx" or "manager-linux" tool in your installation directory. Using this tool, you can Start, Stop or Restart the servers and check the log files. You can click on the icon to start it.

    manager-servers.png

     

    manager-osx.png

     

     

     

     

     

     

     

     

     


    win_platform.png

    On Windows: You can also start the Manager tool from shortcuts: Start -> Program Files -> Bitnami Stack -> Manager tool

    Command line tool

    If you prefer, you can use the "ctlscript.sh" utility from the command line. This script is in the installation directory.

    linux_platform.png

    On Virtual Machines and Cloud images:

    $ sudo /opt/bitnami/ctlscript.sh start

    A native installer on Linux:

    $ cd ~/application-version
    $ ./ctlscript.sh start
    

    mac_platform.png

     

    On OS X: You can start the Manager tool from the installation directory or you can use the "ctlscript.sh" utility from a Terminal.

    host:~ user$ cd /Applications/application-version
    host:~ user$ ./ctlscript.sh start

    How can I run a command in the Ruby Stack?

    All of the Native Installers for Bitnami Stacks are completely self-contained and run independently of the rest of the software or libraries installed on your system. To work correctly, certain environment variables need to be set when you want to invoke commands to access different binaries. Note that in virtual machines or AMIs, the environment is already loaded for the "bitnami" user automatically and the below is not necessary.

    To use RVM is necessary to access to the rubyconsole even if you are in an AMI or a virtual machine.

    Bitnami console is a script to load the Stack environment. This console is useful to run any command included in the Stack: mysql, php, openssl, ruby, rake among others.

    linux_platform.png On Linux:

    $ cd ~/rubystack-version
    $ ./rubyconsole
    
    

    win_platform.png On Windows:

    There is a shortcut in Start -> BitNami Ruby Stack ->"Use Ruby Stack"

    You can also start the "use_ruby.bat" script that you can find in your installation directory.

    mac_platform.png On OS X:

    Open a Terminal and type the following:

    hostname:~ user$ cd /Applications/rubystack-version
    hostname:~ user$ ./rubyconsole
    

     

    It is important to know that you can have your own Ruby installation in your computer. If you run any Ruby command out of the rubyconsole, you will use the standard Ruby installed on your system. If you run the same command into the Rubyconsole you will use the Ruby files that is included in Ruby Stack. For example:

    This command will install rails gems in your Ruby installation. If you run this command out of the rubyconsole, this gem will be installed in the Ruby installed in your system.

    $ gem install rails
    

    If you run the same command into the Rubyconsole, the Rails gem will be installed in the Ruby that ships Ruby Stack. Everything will be self-contained and independent of the rest of the software installed on your system.

    How to install gems in your Ruby Stack?

    If you want to install any gem in your Ruby Stack, you only have to run the "gem install" command. Note that you have to run this command in the Ruby console.

    If you are installing a gem that requires to be compiled, you should have already installed the compilation tools: make, g++ and other tools.

    linux_platform.png On Linux: If you are using Ubuntu, you can install the "build-essential" package via "apt":

    sudo apt-get install build-essential
    

    If you are using other distro you can install g++ and make packages separately.

    win_platform.png On Windows: Bitnami Ruby Stack already ships a Development Kit. It is a MSYS/MinGW based toolkit than enables you to build many of the native C/C++ extensions available for Ruby.

    mac_platform.png On OS X: On OS X there are multiple ways of setup the required environment in OS X:

    * Install Xcode 4.1: This is the preferred way. There is no problems with using this version with the compilation of Rubies and the native gems.

    * Using  osx-gcc-installer, from Kenneth Reitz: This is a stripped down version of Xcode 4.1, which only includes GCC and the required libraries. The limitation of this solution is that it does not include certain headers, such as the Carbon/Cocoa headers, which are found in the main Xcode install (because of license restrictions from Apple). This means that some native gems will fail to compile. You could still get the header packs from Apple but you will have to be a registered Apple Developer.

    * Using Xcode 4.2+: These versions of Xcode use a non-compatible version of GCC. If you want to use them, you will need to start installing Xcode 4.1, and then upgrade, answering not to them when asked to remove prior versions. Then you will have to use '/usr/bin/gcc-4.2' to compile.

     

    How to start with the sample Rails project?

    Once the installation or deployment finishes, you can access the welcome page from your browser. If you have installed the stack on a local machine as a regular user, you can access it at http://localhost on Windows or http://localhost:8080 on OS X and Linux. If not, you can specify the IP address of the server where you installed the Stack. This sample project is optional, if you did not select during the installation, you can check "How to create your own Rails project" section.

    You should see something similar to this page:

    rubystack-welcome.png

     

    Open the Ruby Stack console and go to the "projects" folder:

    $ cd projects/sample
    

    Then start the Rails server with the sample application:

    $ ruby bin/rails server
    

    If you are using a previous version (Rails 2.x instead of Rails 3x), the command that you should execute is the
    following:

    $ ruby bin/server
    

    You can see something like this:

      => Booting WEBrick
      => Rails 3.2.8 application starting on http://0.0.0.0:3000
      => Call with -d to detach
      => Ctrl-C to shutdown server
      [     ] INFO  WEBrick 1.3.1
      [     ] INFO  ruby 1.9.3 (2012-06-08) [i686-linux]
      [     ] INFO  WEBrick::HTTPServer#start: pid=3061 port=3000
    

    Then try to access at http://localhost:3000 from your browser.

    How to start with your own Rails project?

    Ruby Stack creates a "project" folder into the installation directory. We suggest to copy your project to this folder to have everything you need into the installation directory. This folder will not be removed during the uninstallation.

    1. Copy your project to the "project" folder in your installation directory.
      1. If you are using another database's configuration, you'll need to set the configuration in the config/database.yml file of your project.
    2. Open the Ruby Stack console
    3. Start using your Rails project running any command: rake, rails, mysql, etc.

    If you want that Rubyconsole open your project directly, you can edit the "rubyconsole" file and add the following:

    cd your_installdir/projects/your_rails_application
    

    Once you open the rubyconsole you will start in your own project directory.

    How to create your own Rails project?

    Open the Ruby Stack console and run the "rails" command followed by the name of your desired application inside the Rails Environment:

    $ rails new my_new_app
    

    It is possible that you can see the following error on Linux:

    Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs 
    for a list of available runtimes. (ExecJS::RuntimeUnavailable)
    

    In this case you only have to add the rubyracer gem that is already included in Ruby Stack into the "Gemfile":

    ...
    gem 'sqlite3'
    gem 'therubyracer'
    ...
    

    How to create a MySQL database for my new Rails application?

    Open a Ruby Stack console and connect to the mysql database:

    $ mysql -u root 
    

    From there you can run the following:

    mysql> CREATE DATABASE IF NOT EXISTS my_new_app_production;
    mysql> CREATE DATABASE IF NOT EXISTS my_new_app_development;
    mysql> CREATE DATABASE IF NOT EXISTS my_new_app_test;
    mysql> GRANT ALL PRIVILEGES on my_new_app_test.* to 'rubystack'@'localhost' identified by 'your_password';
    mysql> GRANT ALL PRIVILEGES on my_new_app_production.* to 'rubystack'@'localhost';
    mysql> GRANT ALL PRIVILEGES on my_new_app_development.* to 'rubystack'@'localhost'; flush privileges;
    

    Then it is necessary to configure your Rails application to connect to the database. Edit the 'config/database.yml' file and specify the following configuration. You can also copy the 'database.yml' file from the sample project and modify the database name according to your database:

    development:
      adapter: mysql2
      database: my_new_app_development
      username: rubystack
      password: your_password
      host: localhost
      socket: /your_install_dir/mysql/tmp/mysql.sock
      #port: 3306
    test:
      adapter: mysql2
      database: my_new_app_test
      username: rubystack
      password: your_password
      socket: /your_install_dir/mysql/tmp/mysql.sock
      #port: 3306
    production:
      adapter: mysql2
      database: my_new_app_production
      username: rubystack
      password: your_password
      socket: /your_install_dir/mysql/tmp/mysql.sock
      #port: 3306
    

    Note that this configuration is for Linux and OS X. On Windows it is necessary to specify the port instead of the socket path.

    How can I add applications on top of Ruby Stack?

    Bitnami Native Installers come in two formats: stand-alone Stacks and Modules. If you only want to install one Bitnami-packaged application, then just download and install the Stack. It will contain everything you need to run the application.

    If you want to run more than one application, you can install several application Modules on top of it. That way, all of the Bitnami-packaged applications you want to run will share a single instance of Apache, MySQL and PHP, which will save space and improve performance.

    nuevo_php_stacks.jpg 

    You can download and install any PHP-based and Ruby-based Bitnami applications (For example: WordPress, Joomla!, Redmine, SugarCRM...) on top of an existing Bitnami Ruby Stack deployment. You can do so by downloading and installing a module. You can download the available modules for Ruby Stack at http://bitnami.com/stack/ruby/modules

    IMPORTANT: PHP is optional for Ruby Stack. If you want to install any PHP-based applications on top of Ruby Stack you should enable PHP during the installation.

    Once you have downloaded the module, click on it to start the installation process. During the installation process, you will need to specify the  installation directory of your installed Ruby Stack. If you are using the virtual machine or AMI, the default installation directory is "/opt/bitnami".

    module-installdir.png

    You will also need to specify the MySQL root password. This password is the same as the one that you specified in your Ruby Stack installation. If you are using the virtual machine or AMIs, the default password is "bitnami".

    module-password.png

    After the installation process is complete, you can access the installed application from your browser. For example, if you have installed WordPress, you can access it at http://localhost/wordpress on Windows or http://localhost:8080/wordpress on OS X or Linux. Substitute localhost for the right IP address or domain name if you are using a virtual machine or cloud server. The username and password is specified during the installation of the module. You will see something similar to:

    module-link.png

    If you are using a Bitnami Ruby Stack in a machine without a graphical interface, you can run the module installer in text mode. You can use the following command to download and install any Bitnami module from the command line:

    $ wget http://bitnami.com/... (Link to the module)
    $ chmod 755 bitnami-*
    $ ./bitnami-*
    

    How can I deploy my Rails application?

    There are different ways to deploy a Rails application:

    Using Apache with Thin

    This approach consists on having multiple Thin processes running in different ports. Once they are running, Apache will be set up as a proxy balancer, sending the Rails requests to those ports. It is based in Thin parser, Event Machine and Rack.

    On Linux and OS X, you can store the configuration in a yml file and use it to start an  stop the group easily. For example:

    $ cd your_project_folder
    $ thin -s 5 -p 3000 -e production --prefix /appname -C config/thin.yml config
    

    Which will configure 5 processes in ports 3000 to 3004, running in a production environment and using prefix /appname. Once the configuration file has been generated, you can start, stop or restart the by running:

    $ thin -C ${rails_application_dir}/config/thin.yml start/stop/restart
    

    If you are using Ruby Stack on Windows, you can't start multiple servers using "-s" option. You will need to call a command for each instance:

    $ cd your_project_folder
    $ thin -p 3000 -e production --prefix /appname start thin -p 3001 -e production --prefix /appname start
    

    Regarding Apache, you may include the following lines to apache2/conf/httpd.conf:

    ProxyPass /appname balancer://appcluster
    ProxyPassReverse /appname balancer://appcluster
    <Proxy balancer://appcluster>
       BalancerMember http://127.0.0.1:3001/appname
       BalancerMember http://127.0.0.1:3002/appname
       ...
    </Proxy>
    

    That way, each time a Rails request is received it will be sent to the thin servers running in ports 3001, 3002, etc. After restarting Apache the application should be accessible at http://domain:port/appname.

    Using Apache with Passenger

    Passenger is only available for OS X and Linux. To use this method, you just need to include a virtual host which DocumentRoot points to 'public' directory in Rails application.

    <Directory /installdir/apps/myapp/htdocs/public>
        Options +FollowSymLinks
        AllowOverride None
        <IfVersion < 2.3 >
        Order allow,deny
        Allow from all
        </IfVersion>
        <IfVersion >= 2.3>
        Require all granted
        </IfVersion>
        PassengerEnabled on
        SetEnv RAILS_RELATIVE_URL_ROOT "/myapp"
        PassengerAppRoot "/installdir/apps/myapp/htdocs"
    </Directory>
    

    You should make sure that the 'public' and 'config' application folders and their parent directories are readable and executable by Apache. After restarting Apache you can access to your application. It is also possible to deploy a set of applications to different sub URIs. In order to do so, create a root directory which contains links to each of the application's public paths. For example, you can do something like:

    $ mkdir your_installdir/webapps
    $ ln -s your_installdir/app/railsapp1/public your_installdir/webapps/railsapp1
    $ ln -s your_installdir/app/railsapp2/public your_installdir/webapps/railsapp2
    

    Once the links are created, configure Apache using a RailsBaseURI entry for each application to be deployed:

    <VirtualHost *:80>
        ServerName myapplication.com
        DocumentRoot ${installdir}/webapps
        <Directory ${installdir}/webapps>
            Options -MultiViews
            <IfVersion < 2.3 >
            Order allow,deny
            Allow from all
            </IfVersion>
            <IfVersion >= 2.3>
            Require all granted
            </IfVersion>
        </Directory>
        RailsBaseURI /railsapp1
        RailsBaseURI /railsapp2
    </VirtualHost>
    

    After restarting Apache, the applications will be accessible at:

    http://localhost/railsapp1/ and http://localhost/railsapp2/

    How to configure Nginx + Passenger to run Ruby on Rails applications?

    This guide will work for our Cloud Instances, Bitnami Cloud Hosting and Virtual Machines. If you have installed RubyStack in your system, you must override "/opt/bitnami" with your installation directory.

    To configure Nginx to run at port 80, you must stop the apache service before. To do it, you must run:

    /opt/bitnami/ctlscript.sh stop apache

    Once the apache service has been stopped, you must modify the server configuration of /opt/bitnami/nginx/conf/nginx.conf  and be sure that your configuration is similar to this:

    server {
        listen 80;
        server_name example.com;
        root /opt/bitnami/apps7;
        passenger_enabled on;
    
        pagespeed on;
        pagespeed FileCachePath /opt/bitnami/nginx/var/ngx_pagespeed_cache;
    
        #  Ensure requests for pagespeed optimized resources go to the pagespeed
        #  handler and no extraneous headers get set.
        location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" { add_header "" ""; }
        location ~ "^/ngx_pagespeed_static/" { }
        location ~ "^/ngx_pagespeed_beacon$" { }
        location /ngx_pagespeed_statistics { allow 127.0.0.1; deny all; }
        location /ngx_pagespeed_message { allow 127.0.0.1; deny all; }
    }

    With that code, you will be running your Ruby on Rails application on the root of your domain, and will be running through the default HTTP port (80). Before restart Nginx to apply this configuration, we recommend to disable apache from the RubyStack default services.

    To do it, you only need to run this commands:

    /opt/bitnami/ctlscript.sh stop apache
    mv /opt/bitnami/apache2/scripts/ctl.sh /opt/bitnami/apache2/scripts/ctl.sh.disabled
    mv /opt/bitnami/config/monit/conf.d/apache.conf /opt/bitnami/config/monit/apache.conf.disabled
    

    Now, you must restart the Nginx service to apply the new configuration

    /opt/bitnami/ctlscript.sh restart nginx

    And with the last step, you will be able to access to your Ruby on Rails applications with Nginx + Passenger on http://example.com/ 

    How can I access phpMyAdmin?

    phpMyAdmin and phpPgAdmin are popular web-based management tools for the MySQL and PostgreSQL databases.

    For security reasons, these applications are accessible only when using 127.0.0.1 as the hostname. To access them 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 these applications remotely.
     

    IMPORTANT: Before following the steps below, ensure that your Apache and MySQL/PostgreSQL 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.

     

    Follow the steps below for your platform.

    Bitnami Cloud Hosting

    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 phpMyAdmin 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 -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.

    While the tunnel is active, you should be able to access phpMyAdmin and phpPgAdmin through the secure SSH tunnel you created, by browsing to http://127.0.0.1:8888/phpmyadmin and http://127.0.0.1:8888/phppgadmin respectively.

    To log in, use username 'root' for phpMyAdmin or 'postgres' for phpPgAdmin. For the application password, refer to the "Servers -> Manage Server" page of your Bitnami Cloud Hosting dashboard, under the "Application Password" section.

    Refer to this page for more information on obtaining application credentials.

    Microsoft Azure

    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 phpMyAdmin 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 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 phpMyAdmin and phpPgAdmin through the secure SSH tunnel you created, by browsing to http://127.0.0.1:8888/phpmyadmin and http://127.0.0.1:8888/phppgadmin respectively.

    To log in, use username 'root' for phpMyAdmin or 'postgres' for phpPgAdmin and password 'bitnami'.

    Google Cloud Platform

    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 phpMyAdmin 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 -i bitnami-gce-project-name.pem bitnami@100.101.102.103

    Remember to replace 'bitnami-gce-project-name.pem' in the previous commands with the path to your private key file, and '100.101.102.103' 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 phpMyAdmin and phpPgAdmin through the secure SSH tunnel you created, by browsing to http://127.0.0.1:8888/phpmyadmin and http://127.0.0.1:8888/phppgadmin respectively.

    To log in, use username 'root' for phpMyAdmin or 'postgres' for phpPgAdmin. For the application password, follow the steps below:

    • Browse to the Bitnami Launchpad for Google Cloud Platform dashboard and sign in if required using your Bitnami account.
    • Select the "Virtual Machines" menu item.
    • Select your Bitnami AMP Stack server from the resulting list.
    • Obtain credentials by selecting "Show" under "Credentials".

    Refer to this page for more information on obtaining application credentials.

    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 phpMyAdmin 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 phpMyAdmin and phpPgAdmin through the secure SSH tunnel you created, by browsing to http://127.0.0.1:8888/phpmyadmin and http://127.0.0.1:8888/phppgadmin respectively.

    Alternative Approach: Allow Access from All Hosts

    Alternatively, if you are running the virtual machine in a secure environment, you can enable access to phpMyAdmin and phpPgAdmin from hosts other than 127.0.0.1 by editing the /opt/bitnami/apps/phpmyadmin/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:

     <IfDefine USE_PHP_FPM>
        <Proxy "unix:/opt/bitnami/php/var/run/phpmyadmin.sock|fcgi://phpmyadmin-fpm" timeout=300>
        </Proxy>
    </IfDefine>
    <Directory "/opt/bitnami/apps/phpmyadmin/htdocs">
    
    # AuthType Basic                                                                                                                                          
    # AuthName phpMyAdmin                                                                                                                                     
    # AuthUserFile "/opt/bitnami/apache2/users"                                                                                           
    # Require valid-user                                                                                                                                      
    AllowOverride None
    
    <IfModule php5_module>
            php_value upload_max_filesize 80M
    php_value post_max_size 80M
    </IfModule>
    
    <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"
    
    
        <IfDefine USE_PHP_FPM>
           <FilesMatch \.php$>
             SetHandler "proxy:fcgi://phpmyadmin-fpm/"
           </FilesMatch>
        </IfDefine>
    
    </Directory>
    

    Restart Apache to have the changes take effect:

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

    You should now be able to access phpMyAdmin and phpPgAdmin by browsing to http://[virtual-machine-IP-address]/phpmyadmin and http://[virtual-machine-IP-address]/phppgadmin respectively.

    To log in, use username 'root' for phpMyAdmin or 'postgres' for phpPgAdmin. The default password is 'bitnami'.

    Native Installer

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

    You should be able to access phpPgAdmin by browsing to http://127.0.0.1:8080/phppgadmin or http://127.0.0.1/phppgadmin.

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

    Tabs end

    Tag page (Edit tags)
    • No tags
    Pages that link here
    Page statistics
    235142 view(s), 42 edit(s) and 25192 character(s)

    Comments

    You must login to post a comment.

    Attach file

    Attachments