tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: tomcat 4 mod_webapp config
Date Tue, 21 Aug 2001 13:41:39 GMT

Thanks for the patch.  I'll give this a shot today or tomorrow and see if 
that does the trick.


"Pier P. Fumagalli" <>
08/21/2001 08:34 AM
Please respond to tomcat-user

        Subject:        Re: tomcat 4 mod_webapp config


> All,
> I'm having a little problem with mod_webapp (or maybe I'm not
> understanding this properly).
> I have an application deployed in catalina (v. 4b7) called "laserweb"
> (accessible via tomcat's http server port under /laserweb).  I'd like to
> deploy this as the root of a virtual host in apache.  I've configured 
> connector like this within the virutal host:
> WebAppConnection myconn warp localhost:8008
> WebAppDeploy laserweb myconn /
> This doesn't seem to have any affect, as .jsp's, etc. are not being
> processed.  If I pick an URI other than "/", it will work.  (i.e.,
> WebAppDeploy laserweb myconn /testuri
> works as expected -- the webapp is available via
> http://<myapachevirtualhost>/testuri

Philippe Richter just sent me a patch about this one... And AFAICS it's a
good one (I didn't try it yet!) but it'll be in the next version of the

--- wa_config.c Tue Aug 21 13:53:02 2001
+++        Tue Aug 21
13:44:13 2001
@@ -81,10 +81,10 @@
     if (buf[l]=='/') buf[l]='\0';
-    if (buf[0]=='/') {
-        appl->rpth=apr_pstrcat(wa_pool,buf,"/",NULL);
+    if (buf[0]=='/' || l==0) {
+      appl->rpth=apr_pstrcat(wa_pool,buf,"/",NULL);
     } else {
-        appl->rpth=apr_pstrcat(wa_pool,"/",buf,"/",NULL);
+      appl->rpth=apr_pstrcat(wa_pool,"/",buf,"/",NULL);
     /* Zero all other parameters */

> Also, does the module have some way of resolving symbolic links? 
> is symlinked into the $CATALINA_HOME/webapps directory, yet the
> /webapp-info/ page from my virtual host displays the "actual" directory
> location (the target of the link)---I found this a little odd.  How does
> the module know?

I don't know... It's all done in APR... I simply check if that directory
exists or not... Note, the webapp-info should be _really_ disabled on any
propduction server...

> My understanding is that using mod_webapp, tomcat virtual hosts don't
> matter.  Is this incorrect?  Can anyone shed some light on this?

Nope, they don't... You can even remove the whole full first part of the
server.xml (you can keep only the Tomcat-Apache engine).
If you need virtualhost support, just configure them in your Apache
httpd.conf, and put your WebAppDeploy lines inside your <VirtualHost> 

It's all done automatically (no mod_rewrite, no auto-creation of
configuration files, no nothing)


View raw message