Thank you for sharing all this information. We want to clarify some questions before we change anything in the installation:
- We saw that the Joomla httpd-vhosts.conf file has the following configuration files
- But the WordPress configuration file has the following lines
The problem with this configuration is that *.domain.com matches when using joomla.domain.com and that's why you access the WordPress site. Can you change the WordPress configuration lines to these ones?
The current behavior of your installation doesn't match with the configuration files. I can access your Joomla site but I can't access WordPress, did you make any change during this time?
Apart from that, you also need to generate new certificates for those virtual hosts. As you can see the lines are commented to not to run into issues when restarting Apache. You can follow this guide to generate self-signed certificates but you will need to substitute
/opt/bitnami/apache2/conf with the path of the conf directory of those applications (/opt/bitnami/apps/joomla/conf and /opt/bitnami/apps/wordpress/conf).
When generating the certificates, you could enable the certificates in the httpd-vhosts.conf files.
Remember to restart Apache when performing any of these changes
sudo /opt/bitnami/ctlscript.sh restart apache