oraclejoomla

Install multiple Joomla! applications on the same instance

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

After completing the steps explained below, this Joomla! installation will be in the /opt/bitnami/apps/joomla1 directory and use the bitnami_joomla1 database. The URL will change to http://SERVER-IP/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 /opt/bitnami/apps/joomla /opt/bitnami/apps/joomla1
    
  • Modify the Joomla! configuration file for Apache at /opt/bitnami/apps/joomla1/conf/httpd-prefix.conf to use the new path:

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

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

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

    ...
    include=/opt/bitnami/apps/joomla1/conf/php-fpm/pool.conf
    
  • Modify the /opt/bitnami/apps/joomla1/conf/php-fpm/pool.conf file to use the new path:

    ...
    include=/opt/bitnami/apps/joomla1/conf/php-fpm/php-settings.conf
    
  • Should you wish to use Apache virtual hosts, also modify the lines below in the /opt/bitnami/apps/joomla1/conf/httpd-vhosts.conf file to use the new path:

    DocumentRoot "/opt/bitnami/apps/joomla1/htdocs"
    Include "/opt/bitnami/apps/joomla1/conf/httpd-app.conf"
    ...
    DocumentRoot "/opt/bitnami/apps/joomla1/htdocs"
    SSLEngine on
    SSLCertificateFile "/opt/bitnami/apps/joomla1/conf/certs/server.crt"
    SSLCertificateKeyFile "/opt/bitnami/apps/joomla1/conf/certs/server.key"
    Include "/opt/bitnami/apps/joomla1/conf/httpd-app.conf"
    
  • Modify the path in the /opt/bitnami/apps/apache2/conf/bitnami/bitnami-apps-prefix.conf file:

    Include "/opt/bitnami/apps/joomla1/conf/httpd-prefix.conf"
    

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

    Include "/opt/bitnami/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 /opt/bitnami/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 = '/opt/bitnami/apps/joomla1/htdocs';
    public $ftp_enable = '1';
    public $tmp_path = '/opt/bitnami/apps/joomla1/tmp';
    public $log_path = '/opt/bitnami/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 /opt/bitnami/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 /opt/bitnami/ctlscript.sh restart apache
    

Your Joomla! instance should now be accessible at the URL http://SERVER-IP/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:

    $ wget https://bitnami.com/redirect/to/35442/bitnami-joomla-3.3.0-0-module-linux-x64-installer.run
    $ chmod a+x bitnami-joomla-3.3.0-0-module-linux-x64-installer.run
    $ sudo ./bitnami-joomla-3.3.0-0-module-linux-x64-installer.run
    
  • During the installation process, choose /opt/bitnami as the installation path when prompted.

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