1

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.

duduklein
  • 111
  • 3
  • 1
    For lots of reasons using Tomcat as a reverse proxy just doesn't make sense. Go get a copy of varnish or nginx or ATS and configure it as a reverse proxy for all 3 services. – symcbean May 28 '13 at 20:03
  • Why can't you use Apache again? You can only load necessary modules for ProxyPass. – Schrute Jun 04 '13 at 04:18
  • yes. I finally used apache and stopped wasting time – duduklein Jun 05 '13 at 10:10

0 Answers0