MEAN stack express app receiving 502 proxy error

I have a MEAN stack app deployed to GCP. I set the express app to run on port 80 by using the following in this folder location:


ProxyPass /
ProxyPassReverse /

for some reason I am getting a proxy error. I believe it is because of MongoDB. when I go to the sites IP address to see if I can do a GET request the proxy shows up, but when I putty in and go to localhost:3000 the request works there. does any one know why this might be happening?

Hi @shahidfoy,

Did you use any guide to create a custom Node.js application? What did you modify in the /opt/bitnami/apache2/conf/bitnami/bitnami.conf config file?

It is not necessary to include any configuration in that file, you can create a custom file for the Apache configuration related to your application. You can find more information about how to create a new Node.js application on your Bitnami MEAN stack in our guide linked below

Apart from that, you can’t use port 80 for your Express application because that is the port used by Apache. With the ProxyPass configuration above, Apache will redirect requests on port 80 to the Express port 3000 and vice versa so you can access your application on port 80. Also, as mentioned in the guide, you will need to open port 3000 in Google Cloud to access it directly. You can find more information about it in the link below

Hope it helps,

So im deploying an angular 7 application but the mean stack you guys currently has only uses angularJS. I decided to turn off apache and set express to port 80

yeah i’ll have to look into that document on the GCP to open port 3000

Hi @shahidfoy,

Let us know if there is anything else we can help you with!


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