0

My apache redirects to my tomcat

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

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!

1 Answer 1

0

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>

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

Hope this helps.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .