Hi
we have an similar enviroment with apache & tomcat
I use the ProxyPass - directive and <Virtualhost> to serve different
web-domains with one tomcat server.
<Virtualhost x.x.x.x>
ServerAdmin ruedi.schwitter.DeleteThis@feld1.ch
ServerName <a style='text-decoration: underline;' href="http://www.feld1.ch" target="_blank">www.feld1.ch</a>
ProxyPass /yourapp <a style='text-decoration: underline;' href="http://tomcathost:8080/yourapp" target="_blank">http://tomcathost:8080/yourapp</a>
ProxyPassReverse /yourapp/ <a style='text-decoration: underline;' href="http://tomcathost:8080/yourapp/" target="_blank">http://tomcathost:8080/yourapp/</a>
ProxyPass /
<a style='text-decoration: underline;' href="http://tomcathost:8080/yourapp/" target="_blank">http://tomcathost:8080/yourapp/</a>
ErrorLog /usr/local/apache/log/yourapp.log
.....
</Virtualhost>
<Virtualhost x.x.x.x>
ServerAdmin ruedi.schwitter.DeleteThis@feld1.ch
ServerName <a style='text-decoration: underline;' href="http://www.feld2.ch" target="_blank">www.feld2.ch</a>
ProxyPass /yourapp2 <a style='text-decoration: underline;' href="http://tomcathost:8080/yourapp2" target="_blank">http://tomcathost:8080/yourapp2</a>
ProxyPassReverse /yourapp2/ <a style='text-decoration: underline;' href="http://tomcathost:8080/yourapp2/" target="_blank">http://tomcathost:8080/yourapp2/</a>
ProxyPass /
<a style='text-decoration: underline;' href="http://tomcathost:8080/yourapp2/" target="_blank">http://tomcathost:8080/yourapp2/</a>
ErrorLog /usr/local/apache/log/yourapp2.log
.....
</Virtualhost>
Hope this help.
Regards Ruedi
Alan Cooper schrieb:
> I have a server with some tomcat apps.
>
<font color=purple> > The tomcat app is accessed via <a style='text-decoration: underline;' href="http://www.sitename.com/appgroup/app</font" target="_blank">http://www.sitename.com/appgroup/app</font</a>>
>
> I also want this to be the page you see when you visit
<font color=purple> > <a style='text-decoration: underline;' href="http://www.sitename.com</font" target="_blank">http://www.sitename.com</font</a>>
>
> I currently have this working using a META REFRESH on the index.html,
> but I would rather have this working using something serverside such as
> mod_rewrite, essentially so that search engine spidering works correctly.
>
> I have tried using mod_rewrite as follows
>
> RewriteEngine on
<font color=purple> > RewriteRule /(.*) <a style='text-decoration: underline;' href="http://www.sitename.com/appgroup/app/</font" target="_blank">http://www.sitename.com/appgroup/app/</font</a>>
> RewriteLog "/var/log/httpd/rewrite.log"
> RewriteLogLevel 3
>
> But the logs show that Apache is trying to be clever, and rather than
> presenting <a style='text-decoration: underline;' href="http://www.sitename.com/appgroup/app" target="_blank">http://www.sitename.com/appgroup/app</a> to itself so that mod_jk
> picks it up, apache tries to serve /home/user/documentroot/appgroup/app
> which gives a file not found.
>
> Could anyone shed any light on how to get this to work?<!-- ~MESSAGE_AFTER~ -->