Access OpenMRS tomcat server.xml file

I have up and running Bahmni Virtual Box. Virtual Box version is 6.0 and Vagrant version is 2.2.4. I need to access the Tomcat configuration file(server.xml) on which OpenMRS module is running. I have requirement to modify Catalina engine configuration in this file for load balancing implementation. I also want to know or modify the AJP connector port number. But I am not able to access tomcat server.xml file. I need help to access server.xml file to modify these properties or If there is any other way to modify these. Please let me know If there is any solution for it.

Moved to the bahmni category.

OpenMRS Server in Bahmni context runs with embedded tomcat. The runnable jar is located in /opt/openmrs/lib/openmrs.jar

We essentially front OpenMRS with Apache server, we have SSL configured at Apache level, bahmni-apps delivered from a apache virtual directory, and rules and redirections set (using ssl conf) to make all /openmrs calls to go to the running openmrs instance.

ProxyPass /openmrs http://localhost:8050/openmrs

Is this not going to be enough? Unless you want to have a block Java connector for some reason.

If you really want to change things, you have the following option

  1. Change the packaging with your runnable code, meaning you still deploy openmrs as runnable jar, but you can customize the way the tomcat instance is setup programatically. See the packaging here, and also the launcher class
  2. Take the openmrs war file, and deploy on standalone tomcat. if you are deploying on a context, then you have to setup all paths accordingly though. Maybe deploy as default context.