views:

120

answers:

1

I have a web site that I administer that uses Apache 2.0 on the front with Tomcat 6 on the back-end (with mod_proxy proxying the connection between the two).

I want to be able to use the same VirtualHost to also access the phpMyAdmin application running on the box. So, for example, www.mywebsite.com will pass all traffic to Tomcat, but www.mywebsite.com/myadmin (with obvious security) will pass traffic to phpMyAdmin.

+1  A: 

How about using mod_rewrite instead of mod_proxy?

You can use the P modifier to send certain request (i.e. all those that aren't to /phpmyadmin*) through a proxy. This actually uses mod_proxy internally.

Something like this (not tested):

 RewriteCond %{REQUEST_URI} !^/phpmyadmin
 RewriteRule ^.*$ http://tomcat/$0 [P,L]
Greg