I am looking to achieve this configuration. So I tried this but the server is allways looking for server_test
and server_prod
in the htdocs
under Apache. What I want is to redirect the request to the Tomcat server. If I use different ports without the /server_test and /server_prod, it worked but it's not what I wanted.
<virtualhost mydomaine.com/server_test:80>
ServerName mydomaine.com
ProxyRequests Off
ProxyPass / ajp://internalIp:8008/
ProxyPassReverse / http://mydomaine.com/server_test/
ProxyPassReverseCookiePath / /
</virtualhost>
<virtualhost mydomaine.com/server_prod:80>
ServerName mydomaine.com
ProxyRequests Off
ProxyPass / ajp://internalIp:8009/
ProxyPassReverse / http://mydomaine.com/server_prod/
ProxyPassReverseCookiePath / /
</virtualhost>
Any help would be appreciated