How to place two node applications on the MEAN bit stack?

I had two node applications on a Bitnov middle stack server, referencing a link

Problems

1) According to this documentation, my application should run on http: // [your-IP-address] / myapp url, but it opens directly at http: // [your-IP-address] .

2) I placed two node applications running on ports 4000 and 5000. When you click on ip, it opens this application, which is first placed in this file "/ opt / bitnami / apache2 / conf / bitnami / bitnami-apps-prefix. conf ".

contents of bitnami-apps-prefix.conf

# Bitnami applications installed in a prefix URL
Include "/opt/bitnami/apps/app1/conf/httpd-prefix.conf"
Include "/opt/bitnami/apps/app2/conf/httpd-prefix.conf"
Include "/opt/bitnami/apps/rockmongo/conf/httpd-prefix.conf"

3) How to map the url to open a specific application.

App1 Settings -> httpd-app.conf

ProxyPass / http://127.0.0.1:5000/ 
ProxyPassReverse / http://127.0.0.1:5000/

App2 Settings -> httpd-app.conf

ProxyPass / http://127.0.0.1:4000/ 
ProxyPassReverse / http://127.0.0.1:4000/
+4
1

ProxyPass ProxyPassReverse httpd-app.conf .

App1 → httpd-app.conf

ProxyPass /app1/ http://127.0.0.1:5000/ 
ProxyPassReverse /app1/ http://127.0.0.1:5000/
ProxyPass /app1 http://127.0.0.1:5000/ 
ProxyPassReverse /app1 http://127.0.0.1:5000/

App2 → httpd-app.conf

ProxyPass /app2/ http://127.0.0.1:4000/ 
ProxyPassReverse /app2/ http://127.0.0.1:4000/
ProxyPass /app2 http://127.0.0.1:4000/ 
ProxyPassReverse /app2 http://127.0.0.1:4000/

/app1/, /app1, /app1, - /app1/. .

root (/), bitnami-apps-prefix.conf:

# Bitnami applications installed in a prefix URL
Include "/opt/bitnami/apps/app1/conf/httpd-prefix.conf"
Include "/opt/bitnami/apps/app2/conf/httpd-prefix.conf"
Include "/opt/bitnami/apps/rootapp/conf/httpd-prefix.conf"

→ httpd-app.conf

ProxyPass / http://127.0.0.1:3000/ 
ProxyPassReverse / http://127.0.0.1:3000/
+1

All Articles