Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

My apache redirects to my tomcat

<VirtualHost www.example.com:80>
    ProxyPass http://localhost:8080/
    ProxyPassReverse http://localhost:8080/

But my tomcat has more webapps, and I would have another apache http virtualhost pointing to this tomcat.

I need this behavior:

www.example.com/tomcatapp1  --> tomcat http://localhost:8080/myexamples/tomcatapp1
www.example.com/tomcatapp2  --> tomcat http://localhost:8080/myexamples/tomcatapp2

www.foo.com --> tomcat http://localhost:8080/foo

myexamples can be a folder? How I configure tomcat to do that? What I need to use?

Many thanks!

share|improve this question

1 Answer 1

why do you need the myexamples folder? Couldn't you just deploy tomcatapp1 and tomcatapp2? These would be folders.

I think this could be what you are looking for:

 <VirtualHost www.example.com:80>
   ProxyPass /tomcatapp1 http://localhost:8080/tomcatapp1
   ProxyPassReverse /tomcatapp1 http://localhost:8080/tomcatapp1

   ProxyPass /tomcatapp2 http://localhost:8080/tomcatapp2
   ProxyPassReverse /tomcatapp2 http://localhost:8080/tomcatapp2

 <VirtualHost www.foo.com:80>
   ProxyPass / http://localhost:8080/foo
   ProxyPassReverse / http://localhost:8080/foo

Hope this helps.

share|improve this answer

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.