Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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
add comment

1 Answer 1

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
add comment

Your Answer

 
discard

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.