8

I have tomcat running on port 8080 and want a particular URL, lets say http://example.com/app, to actually point to example.com:8080/app

I have other content on the website that should remain unchanged.

  • Depends upon what you mean by 'point'. Do you want to just redirect traffic from example.com/app to example.com:8080/app (and thus exposing port 8080 to external traffic) or do you want to hide the existance of Tomcat behind Apache, by running all requests through Apache to Tomcat, and returning all results back from Tomcat through Apache to the user? – Craig Trader Jul 22 '10 at 13:57
  • hide Tomcat; users should not see 8080 – Adam L Davis Jul 22 '10 at 14:11
13

It sounds like what you want is not a redirect but actually a proxy. Check out the information found in the mod_proxy config page. You should end up with something like:

ProxyPass /app http://example.com:8080/app
ProxyPassReverse /app http://example.com:8080/app
  • 1
    Specifically, a Reverse Proxy – Craig Trader Jul 22 '10 at 13:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.