Score:0

Configure Tomcat 9 to act as a proxy for internal web server

cn flag

I have a web application on a server that uses Tomcat 9. It has been set up for one web application, and has certificates and domain etc. Now I have another server on the network, that hosts another application. It has been an internal tool until now, and now it needs to be accessible from the internet. Unfortunately another certificate and domain costs an absolute ridiculous amount of money for some reason, and now I am looking if I could set up the Tomcat to serve the other (normal LAMP) server and act as a proxy, so that when accessing a certain url, for example tomcatserver.example/lampserver etc. Tomcat would proxy the traffic to the other server.

Both servers run Ubuntu, and I have root privileges if necessary. I can also ask the server provider to open ports to the internet.

Score:1
pe flag

Tomcat does not have support for acting as a reverse proxy.

If the second server is a LAMP server then httpd can act as a reverse proxy. It would be worth considering reorganising things so the LAMP server uses the domain and certificate and then proxies requests to the Tomcat instance as required.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.