Ok @ghina.altal,
Let’s start with the installation of the WordPress modules
cd /tmp
wget https://downloads.bitnami.com/files/stacks/wordpress/5.0.3-2/bitnami-wordpress-5.0.3-2-module-linux-x64-installer.run
chmod +x bitnami-wordpress-5.0.3-2-module-linux-x64-installer.run
sudo ./bitnami-wordpress-5.0.3-2-module-linux-x64-installer.run --wordpress_instance_name testatc
sudo ./bitnami-wordpress-5.0.3-2-module-linux-x64-installer.run --wordpress_instance_name testdo
sudo ./bitnami-wordpress-5.0.3-2-module-linux-x64-installer.run --wordpress_instance_name yasholding
After that, check that you can access those applications using yourIP/testatc, yourIP/testdo adn yourIP/yasholding. Those applications are empty so you will need to move the content of the current installations you have in htdocs to those folders
sudo mv /opt/bitnami/apps/testatc/htdocs /opt/bitnami/apps/testatc/htdocs.back
sudo mv /opt/bitnami/apps/testdo/htdocs /opt/bitnami/apps/testdo/htdocs.back
sudo mv /opt/bitnami/apps/yasholding/htdocs /opt/bitnami/apps/yasholding/htdocs.back
sudo cp -rp /opt/bitnami/apache2/htdocs/ww1.testatc.co.ae /opt/bitnami/apps/testatc/htdocs
sudo cp -rp /opt/bitnami/apache2/htdocs/ww1.testdo.ae /opt/bitnami/apps/testdo/htdocs
sudo cp -rp /opt/bitnami/apache2/htdocs/ww1.yasholding.ae /opt/bitnami/apps/yasholding/htdocs
Ensure now that you can access all the information you had in your previous installations using the /testatc, /testdo and /yasholding. You could remove the apache2/htdocs folder once you confirm that everything works as expected.
Finally, in order to configure the VirtualHosts https://docs.bitnami.com/aws/infrastructure/lamp/configuration/configure-custom-application/:
- You will need to set the ServerNames and ServerAlias parameters in the /opt/bitnami/apps/testatc/conf/httpd-vhosts.conf. You will need to do the same with the other folders.
- Remove the httpd-prefix.conf lines from the /opt/bitnami/apache2/conf/bitnami/bitnami-apps-prefix.conf
- Include those files in the /opt/bitnami/apache2/conf/bitnami/bitnami-apps-vhosts.conf
Include "/opt/bitnami/apps/testatc/conf/httpd-vhosts.conf"
Include "/opt/bitnami/apps/testdo/conf/httpd-vhosts.conf"
Include "/opt/bitnami/apps/yasholding/conf/httpd-vhosts.conf"
- Generate the certificate files
sudo ln -sf /opt/bitnami/apache2/conf/server.crt /opt/bitnami/apps/testatc/conf/certs/server.crt
sudo ln -sf /opt/bitnami/apache2/conf/server.key /opt/bitnami/apps/testatc/conf/certs/server.crt
sudo ln -sf /opt/bitnami/apache2/conf/server.crt /opt/bitnami/apps/testdo/conf/certs/server.crt
sudo ln -sf /opt/bitnami/apache2/conf/server.key /opt/bitnami/apps/testdo/conf/certs/server.crt
sudo ln -sf /opt/bitnami/apache2/conf/server.crt /opt/bitnami/apps/yasholding/conf/certs/server.crt
sudo ln -sf /opt/bitnami/apache2/conf/server.key /opt/bitnami/apps/yasholding/conf/certs/server.crt
sudo /opt/bitnami/ctlscript.sh restart apache
Let us know if you have any questions or if something doesn’t work as expected