Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

Is there any way to forward requests from Tomcat to an Apache httpd server?

I know you can do it the other way around with mod_proxy_ajp, but here's what I'd like to accomplish:

We have a Java site running under Tomcat and Apache httpd is not installed. I'd like to set it up so that everything stays the same but that requests to /folder1 are forwarded to Apache and the rest of the requests stay within Tomcat.

From what I've read, the only way I could do this is change my server configuration so that Apache runs on port 80 and fowards everything to Tomcat except /folder1. But I'd like to set it up so Tomcat runs on port 80 and just sends the /folder1 requests to httpd... a lot less to change this way

Possible?

share|improve this question

migrated from stackoverflow.com Oct 13 '11 at 12:02

This question came from our site for professional and enthusiast programmers.

I don't believe so. I think you'd need to set up port 80 on apache and reverse proxy everything but /folder1 to tomcat.

If /folder1 is a series of static files and you are using tomcat 7, you might be able to get by aliasing /folder1 so that tomcat still serves up those files. See the Standard Implementation section of the Tomcat 7 Configuration Reference for more info.

share|improve this answer

Your Answer

 
discard

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