Hi, I am deploying two instances of dhis2 on one server with nginx as reverse proxy. both instances are working but I am struggling with the reverse proxy. I want to use one domaine name and access the second instance by adding a subfolder to the domain name in the browser. The first instance is deployed on docker and the second one is deployed locally on the server running on port 8080 in a subfolder of /opt.
My configuration is similar to the following but when I access the first one it is working but the second one is not working it keeps bringing me back to the first one
Based on your configuration, I believe the second DHIS2 instance configuration causes the issue. I think the proxy pass should be to http://locahost:8080/training instead of just http://locahost:8080. I also don’t think it is necessary to add the root variable.
I would also recommend you check out the official server tools that is maintained by the DHIS2 core team for better management of your instances. You can find it here
Thank you for your answer. I have removed the root variable and I also put “training” at the end of the proxy_pass. Now it seems working but when I go to maintenance It does not work maintenance is not showing. it is trying to go the internal IP when i look in the network tab in developer tools