Bahmni instances, same local network, external access ?

Hi everyone,

my usecase is the following : I need 2 separate Bahmni&Metabase instances in the same local network. To connect from within the local network, there’s no issue as I have a local DNS zone with entries pointing to host1 & host2.

The issue is for the external access, as both applications use the same ports (80/443&9003) on both hosts. I would like the users to be redirected to the correct Bahmni instance according to the URL they’ll be entering host1 or host2.

Did anybody ever do something similar ? Is it possible to create a 3rd machine in the same network to act as a reverse proxy ?

Thanks for your inputs

You can use either a proxy (e.g. HAProxy) or even a server (Apache and Nginx) to route the calls against any subdomain or context. Also you wouldnt individually open up both hosts - the proxy or routing takes care of that.

I made it work using nginx on another machine acting as a reverse proxy.

Thank you !

1 Like