On Fri, September 24, 2004 10:44, Stephan Paukner said: > We are using a (J2EE-based) CMS, where clients have their sites as > subdirectories under .../webapps, i.e. a single webapp means a single > virtual host. > > On our older server (Suse 8.0) they were deployed using mod_webapp, the > Apache VirtualHosts each had a line like 'WebAppDeploy abc tomcat /' > (tomcat being the name of the WebAppConnection). > > Now, on Suse 9.0 this doesn't work anymore, as the mod_webapp throws an > exception, saying that the context root must match the name of the > webapp, i.e. is expecting lines like 'WebAppDeploy abc tomcat /abc'. > > I already spent so many hours finding out how to deploy these webapps for > the virtual hosts via "/", and not via "/abc". I found examples using > <Host>-entries in server.xml combined with lines 'WebAppDeploy . tomcat > /' in the VirtualHosts, but with about 10 webapps being configured that > way I got more than 400 java-processes after restarting Apache, which is > not usable. > > I somewhere read at jakarta.apache.org that mod_webapp is obsolete, so I > tried with mod_jk, as this seems to be the recommended way with Suse 9.0 > anyway (already activated by default). But still, I somehow only get the > webapps being deployed as subdirectories ("www.xyz.com/abc/"), and not as > "www.xyz.com/" only. I tried with different JkMount/Alias/DocumentRoot > directives, but I didn't get it right. > > So, how do I do it? Any hints would be greatly appreciated!
I finally found out by myself: <Host>-entries in server.xml are really needed for this. The examples at http://jakarta.apache.org/tomcat/tomcat-3.3-doc/mod_jk-howto.html show it the right way. I included them below the localhost entry, i.e. into the following section of server.xml: <Service name="Tomcat-Standalone"> ... <Host name="localhost" ...> ... </Host> <Host name="www.domain.com"> <Context path="" docBase="/path/to/webapps/client1" debug="0"/> <Context path="/cmsapp" docBase="/path/to/webapps/cmsapp" debug="0"/> </Host> </Service> The corresponding VirtualHost needs an 'Alias /cmsapp /path/to/webapps/cmsapp' entry in addition to also deploy it. Side note: I also found out that server.xml (and probably all XML-files) doesn't accept umlauts, even if they are in comments, as the XML-parser will throw an exception, i.e. Tomcat cannot be launched. Regards -- Stephan Paukner <[EMAIL PROTECTED]> GnuPG public key ID: 0xAC6B7700 Jabber ID: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]