I need to you Apache Tomcat as a reverse proxy (this is a requirement) for 2 other services (sonar and jenkins) that are running on their standalone modes each one on a different port. My client wants to access them as sonar.clienturl.com and jenkins.clienturl.com.
I thought of using Apache as a reverse proxy for this case as I was unable to make Tomcat runs both applications (with their respective .war files) because of high CPU utilization issues.
I searched for how to do this and found the J2EP plugin that could do the job. But I can't find out which rule I would apply. I need to "redirect" all the requests from sonar.clienturl.com to localhost:9000 and jenkins.clienturl.com to localhost:8080
The only filter that seems to do the job is the RewriteRule, but my regexp is not working. the "from" parameter is set to "^sonar\.clienturl\.com(.*)"
and the "to" is set to "localhost:9000$1". I know that this rule is not causing any match because I'm being redirected to the page when no rule is found.
How can I achieve my goal (with or without this plugin)?
ps: make tomcat runs both applications directly and set up virtual hosts is not an option.