Install multiple Joomla! applications on the same instance

Before running the commands shown on this page, you should load the Bitnami stack environment by executing the installdir/use_APPNAME script (Linux and MacOS) or by clicking the shortcut in the Start Menu under “Start -> Bitnami APPNAME Stack -> Application console” (Windows). On OS X VMs, the installation directory is /opt/bitnami and OS X VM users can click the “Open Terminal” button to run commands. Learn more about the Bitnami stack environment and about OS X VMs.

By default, the Bitnami Joomla! Stack installs Joomla! in the installdir/apps/joomla directory and configures it to use the bitnami_joomla database. The URL to Joomla! is usually http://localhost/joomla.

After completing the steps explained below, this Joomla! installation will be in the installdir/apps/joomla1 directory and use the bitnami_joomla1 database. The URL will change to http://localhost/joomla1.

Of course, you can change the prefix to a different one, and you can use Apache virtual hosts to have a different URL for each Joomla! site

Modify Apache configuration

Follow these steps:

  • Rename the Joomla! application folder:

    $ sudo mv installdir/apps/joomla installdir/apps/joomla1
  • Modify the Joomla! configuration file for Apache at installdir/apps/joomla1/conf/httpd-prefix.conf to use the new path:

    DocumentRoot "installdir/apps/joomla1/htdocs"
    Alias /joomla1/ "installdir/apps/joomla1/htdocs/"
    Alias /joomla1 "installdir/apps/joomla1/htdocs"
    Include "installdir/apps/joomla1/conf/httpd-app.conf"
  • Modify the installdir/apps/joomla1/conf/httpd-app.conf file to use the new path:

    <Directory "installdir/apps/joomla1/htdocs">
    Include "installdir/apps/joomla1/conf/banner.conf"
    Include "installdir/apps/joomla1/conf/htaccess.conf"
  • Modify the Apache .htaccess file at installdir/apps/joomla1/conf/htaccess.conf and change the base URL /joomla to /joomla1, as shown below:

    <Directory "installdir/apps/joomla1/htdocs">
    RewriteBase /joomla1
  • Modify the installdir/php/etc/php-fpm.conf file to use the new path:

  • Modify the installdir/apps/joomla1/conf/php-fpm/pool.conf file to use the new path:

  • Should you wish to use Apache virtual hosts, also modify the lines below in the installdir/apps/joomla1/conf/httpd-vhosts.conf file to use the new path. You will also need to add the necessary SSL certificates, which you can either generate or copy the demo certificates from another Bitnami Joomla! installation.

    <VirtualHost *:80>
    DocumentRoot "installdir/apps/joomla1/htdocs"
    Include "installdir/apps/joomla1/conf/httpd-app.conf"
    <VirtualHost *:443>
    DocumentRoot "installdir/apps/joomla1/htdocs"
    SSLEngine on
    SSLCertificateFile "installdir/apps/joomla1/conf/certs/server.crt"
    SSLCertificateKeyFile "installdir/apps/joomla1/conf/certs/server.key"
    Include "installdir/apps/joomla1/conf/httpd-app.conf"
  • Modify the path in the installdir/apps/apache2/conf/bitnami/bitnami-apps-prefix.conf file:

    Include "installdir/apps/joomla1/conf/httpd-prefix.conf"

    If using virtual hosts, comment out the line above and instead add the following line to the installdir/apache2/conf/bitnami/bitnami-apps-vhosts.conf file:

    Include "installdir/apps/joomla1/conf/httpd-vhosts.conf"

Modify MySQL configuration

Follow these steps:

  • Using phpMyAdmin, select the bitnami_joomla database in the left side menu, click the “Operations” tab and rename it to bitnami_joomla1.

    phpMyAdmin database management

  • Modify the database configuration in Joomla! to use the new database by editing the installdir/apps/joomla1/htdocs/configuration.php file and modifying it as below:

    /*Database Settings */
    public $user = 'bn_joomla1';
    // DB username
    public $password = 'DATABASE_PASSWORD';
    // DB password
    public $db = 'bitnami_joomla1';
    // DB database name
    public $ftp_root = 'installdir/apps/joomla1/htdocs';
    public $ftp_enable = '1';
    public $tmp_path = 'installdir/apps/joomla1/tmp';
    public $log_path = 'installdir/apps/joomla1/logs';

    NOTE: Copy the value appears in the DATABASE_PASSWORD placeholder and save it in a safe place. It will be required in the next step.

  • Grant access to the new database to the user bn_joomla1 by executing the following command:

    sudo installdir/mysql/bin/mysql -u root -p
  • Insert your application password to access the database and replace the DATABASE_PASSWORD placeholder with the value you have copied from the previous file.

    Password: ****
    mysql> grant all privileges on bitnami_joomla1.* to 'bn_joomla1'@'localhost' identified by 'DATABASE_PASSWORD';
  • Restart the Apache server so that it uses the new configuration:

    $ sudo installdir/ restartapache

Your Joomla! instance should now be accessible at the URL http://localhost/joomla1.

Install a new Joomla! application

Follow these steps:

  • Download a new Joomla! module from the Bitnami website and install it on the server. Here are example commands for the Linux platform (note that the version number will differ):

    $ wget
    $ chmod a+x
    $ sudo ./
  • During the installation process, choose installdir as the installation path when prompted.

You should now have two Joomla! sites using the same Apache and MySQL servers.

Last modification March 29, 2019