How to serve my own pages, not the default page on the bitnami node server on google compute engine

I started a bitnami node server instance on google engine. I uploaded my application files to vm using filezilla. My application is in

/home/bitnami/Rockstar22 

I have an app.js file that is in my node file. I am connecting to a mongodb instance (in a different instance in the same project) using mongoose. When I pass ssh to my instance and cd to this directory, I execute the following command, just like locally

 node app.js 

and displays two console logs (for my confirmation that it works)

 connected to monog... Listening on port 3000.... 

now I already bought a domain on goDaddy and I set the A record to the external IP of my instance, but it does not serve the pages I want. Instead, it serves as the default page.

enter image description here

Is there some kind of apache configuration that I need to do in order for it to serve my application pages? After about 10 minutes, it starts displaying this error

enter image description here

0
source share
1 answer

Bitnami developer is here.

What IP address are you using for your Node application? You must use port 3000 if you do not configure it. If you want to access port 80 as a Bitnami application, you can follow the Bitnami wiki guide to configure the Node application with Forever and Apache: https://wiki.bitnami.com/Applications/Bitnami_Custom_Node.js_Application

Also, it seems that your application is using an external IP to access MongoDB. I would configure it to use 127.0.0.1, since the Bitnami MongoDB component does not allow remote connections by default. If you really want to allow remote connections, you can change bind_ip from 127.0.0.1 to 0.0.0.0 and then restart MongoDB. You can read more about this here: https://wiki.bitnami.com/Components/mongoDB#How_to_connect_to_the_MongoDB_database_from_a_different_machine.3f

0
source

All Articles