You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by VA...@LILLY.COM on 2001/08/21 05:51:11 UTC
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 the
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
Also, does the module have some way of resolving symbolic links? laserweb
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?
My understanding is that using mod_webapp, tomcat virtual hosts don't
matter. Is this incorrect? Can anyone shed some light on this?
Thanks,
Jason
Re: tomcat 4 mod_webapp config
Posted by "Pier P. Fumagalli" <pi...@betaversion.org>.
VASQUEZ_JASON@LILLY.COM at VASQUEZ_JASON@LILLY.COM wrote:
> 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 the
> 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
module.
--- wa_config.c Tue Aug 21 13:53:02 2001
+++ webapp-module-1.0-tc40b7.new/lib/wa_config.c Tue Aug 21
13:44:13 2001
@@ -81,10 +81,10 @@
strncpy(buf,p,1024);
l=strlen(buf)-1;
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? laserweb
> 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> tags.
It's all done automatically (no mod_rewrite, no auto-creation of
configuration files, no nothing)
Pier