2 domain pointing to /opt/bitnami/

Keywords: WordPress - Google Cloud Platform - How to - Other

Hi, is it possible to use two domains using the same Google Cloud instance and the same ip?

I’m using a bitnami certified Wordpress stack and I want to install a php script in a folder inside / opt / bitnami /

so my main domain would remain pointing to my wordpress installation
/ opt / bitnami / wordpress /

and a secondary domain to the folder where the script is installed
/ opt / bitnami / script

I can do this ?

the two domains are already configured and pointing to the server ip…

When I access the server from the secondary domain, it redirects to the main domain and goes to my wordpress installation.

I need the secondary domain to be pointed to the folder
/ opt / bitnami / script

I haven’t found any updated documentation, can someone help me?

Hello @Ph3llypeSS,

Can you please check the following post by my colleague? I think it may be of help to configure your Apache using the ServerName and DocumentRoot directives:

Francisco de Paz

1 Like

the link to the guide your friend mentioned seems to have been deleted…

I tried to follow the thread tutorial but I’m using an updated wordpress bitnami stack and the whole folder structure seems to have changed…

I found the file “httpd-vhosts.conf” in the path:

but I couldn’t find the httpd-app.conf file to reference in the include and also I couldn’t find the bitnami-apps-vhosts.conf file

Where were these files moved?

Hello @Ph3llypeSS,

Could you check this documentation?

Substitute ServerAlias * with Your correct ServerName and ServerAlias.

If you find issues with this, we have a Support Tool that will gather relevant information for us to analyze your configuration and logs. Could you please execute it on the machine where the stack is running by following the steps described in the guide below?

Please note that you need to paste the code ID that is shown at the end.

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

I didn’t have the expected result…

the secondary domain
( www.m…eiro.cf )
keeps redirecting to the primary domain
( www.t…lowers.com ).

The secondary domain should point to the folder

What should I do ?


Hello @Ph3llype,

The documentation says:

Create and edit the /opt/bitnami/apache2/conf/vhosts/myapp-vhost.conf file and add the configuration block shown below

Create and edit the /opt/bitnami/apache2/conf/vhosts/myapp-https-vhost.conf file and add the configuration block shown below

I cannot see those files. Did you create them? Note that myapp can be replaced by the name of your app.

Apart from that, please substitute ServerAlias * with your correct ServerName and ServerAlias in /opt/bitnami/apache2/conf/vhosts/wordpress-https-vhost.conf and /opt/bitnami/apache2/conf/vhosts/myapp-https-vhost.conf. For example:

ServerName t…lowers.com
ServerAlias  www.t…lowers.com


ServerName m…eiro.cf 
ServerAlias  www.m…eiro.cf 


1 Like

Thanks David, it worked!

Now if I want the folder to be accessed by a subdomain is the procedure the same?

I tried to change the ServerName and ServerAlias ​​​​setting to a subdomain of my main domain
and it didn’t work, can you check if something wrong was done?

Hello @Ph3llype,

The procedure should be the same. Did you configure your DNS provider to resolve those subdomains? You can use this tool to verify is this is pointing to your IP.



1 Like

I had forgotten to configure the dns, everything is working perfectly now… thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.