Welcome to the community! The error Server access error: 502 Bad Gateway error message (nginx) is a generic one which can be caused for several reasons; therefore, to understand what’s going on, you’ll need to check the logs please.
Would you share the logs for nginx and tomcat (without sensitive / authentication info)?
Generally it means nginx try to speak to the java process of tomcat but can’t.
If you got it working a first time, I assume it’s the java process that is dead or stopped.
You probably need to look at Catalina.out or dhis2 logs (in the dhis directory where dhis.conf is)
Do you have nginx and dhis2 on the same machine ?
Check if tomcat is running
Check the nginx config if points to the correct address/ports
Check the firewall accept incoming connections on ports 80/443
Try to draw a diagram like this and test the “lines” crossing boxes with curl
Note if your machine restart regularly, verify tomcat is configured to restart after boot.
Hi AL Gassim, Thank you for your Feedback. I don’t have access to the server. I have reached out to BAO to deal with this. I will give you feedback if that works.