Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
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 – adamldavis Jul 22 '10 at 14:11
up vote 12 down vote accepted

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
share|improve this answer
Specifically, a Reverse Proxy – Craig Trader Jul 22 '10 at 13:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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