Hi @Ron2,
Thanks for using Bitnami. I think it is easier (and safer too) if you install a fresh new Bitnami WordPress module on your current Bitnami installation as mentioned in this guide
https://docs.bitnami.com/installer/apps/wordpress/configuration/install-several-wordpress-modules/
You will need to download the Bitnami WordPress module from our website to your server and then run it as shown below. Remember to substitute the VERSION
and NEW_BLOG_NAME
placeholders for your values.
sudo chmod a+x bitnami-wordpress-VERSION-module-linux-x64-installer.run
sudo ./bitnami-wordpress-VERSION-module-linux-x64-installer.run --wordpress_instance_name NEW_BLOG_NAME
Installing a new WordPress site this way will ensure that they are independent (and will use different databases as well).
If you want to keep using your current configuration, you need to follow the next steps:
- Modify the current virtualhost configuration setting the
ServerName
and ServerAlias
for your main site: mydomain.com
in the /opt/bitnami/apps/wordpress/conf/httpd-vhosts.conf
file.
- Copy and paste that configuration at the end of the file and modify the
ServerName
, ServerAlias
and DocumentRoot
with the second website values.
At the end of those steps, the /opt/bitnami/apps/wordpress/conf/httpd-vhosts.conf
file should looke similar to this (but with your actual values instead of the placeholders)
<VirtualHost *:80>
ServerName mydomain.com
ServerAlias www.mydomain.com
DocumentRoot "/opt/bitnami/apps/wordpress/htdocs"
Include "/opt/bitnami/apps/wordpress/conf/httpd-app.conf"
</VirtualHost>
<VirtualHost *:443>
ServerName mydomain.com
ServerAlias www.mydomain.com
DocumentRoot "/opt/bitnami/apps/wordpress/htdocs"
SSLEngine on
SSLCertificateFile "/opt/bitnami/apps/wordpress/conf/certs/server.crt"
SSLCertificateKeyFile "/opt/bitnami/apps/wordpress/conf/certs/server.key"
Include "/opt/bitnami/apps/wordpress/conf/httpd-app.conf"
</VirtualHost>
<VirtualHost *:80>
ServerName othersite.com
ServerAlias www.othersite.com
DocumentRoot "/opt/bitnami/apps/wordpress/htdocs/secondsite"
Include "/opt/bitnami/apps/wordpress/conf/httpd-app.conf"
</VirtualHost>
<VirtualHost *:443>
ServerName othersite.com
ServerAlias othersite.com
DocumentRoot "/opt/bitnami/apps/wordpress/htdocs/secondsite"
SSLEngine on
SSLCertificateFile "/opt/bitnami/apps/wordpress/conf/certs/server.crt"
SSLCertificateKeyFile "/opt/bitnami/apps/wordpress/conf/certs/server.key"
Include "/opt/bitnami/apps/wordpress/conf/httpd-app.conf"
</VirtualHost>
- Include this file in the
/opt/bitnami/apache2/conf/bitnami/bitnami-apps-vhosts.conf
by adding the line below
Include "/opt/bitnami/apps/wordpress/conf/httpd-vhosts.conf"
- Restart Apache for changes to take effect
sudo /opt/bitnami/ctlscript.sh restart apache
Best regards,
Gonzalo