tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Kilbride" <j...@kilbride.com>
Subject Re: apache vhost->mod_jk->servlet container & ResourceBundle problem
Date Wed, 11 Apr 2001 01:14:45 GMT
Hi Brian,

Your welcome. Actually, I tested setting up a VHost with the DocumentRoot in
Apache set to the same physical directory as the docBase in server.xml and
it worked. Here's an example w/generic info:

Apache:
<VirtualHost 111.222.333.444>
    ServerName www.tld.com
    ServerAdmin webmaster@tld.com
    DocumentRoot "/home/webdev/websites/tld"

    JkMount /servlet/* ajp13
    JkMount /*.jsp ajp13
</VirtualHost>

server.xml:
<Host name="www.tld.com" >
    <Context path=""
                  docBase="/home/webdev/websites/tld"
                  crossContext="false"
                  debug="0"
                  reloadable="true" >
     </Context>
</Host>

This does the following:
    www.tld.com  --  HTML and JSP files pull up correctly
    www.tld.com/servlet  --  servlets pull up correctly

Servlets pull from the following physical directory:
/home/webdev/websites/tld/WEB-INF/classes

Note: you should also add a <Location> directive to the Apache config to
keep people from viewing your WEB-INF directory.

--jeff


----- Original Message -----
From: "Brian Elliott" <belliott@unpluggedsystems.com>
To: <tomcat-user@jakarta.apache.org>
Cc: <brendon@commaflex.com>
Sent: Tuesday, April 10, 2001 11:44 AM
Subject: Re: apache vhost->mod_jk->servlet container & ResourceBundle
problem


> Thanks to Jeff Kilbride for his post! I ended up using his suggestions
> posted earlier on virtual hosting and it works well. It seems like a
> better solution from a security standpoint. But I am just so glad to get
> something that works after struggling with it for a week.
>
> Also on the ResourceBundle / locale problem I posted earlier: I hadn't
> really looked at the code in HelloWorldExample.java to realize it was
> trying to do an I18L HelloWorld. So I just removed the ResourceBundle
> code for now to get me going - which is fine.
>
> Brian Elliott
>
> Brian Elliott wrote:
> >
> > Brendon,
> >
> > I am having problems establishing the same configuration that you are
> > trying to do:
> >
> > /home/domain1.com/servlet
> > /home/domain2.com/servlet
> >
> > And accessing the jsps for each domain from the document root or below.
> > This way all the servlets and jsps are under the domain's doc root.
> > Being pretty green in tomcat installation (and yet to get it working for
> > an embedded configuration), I am not sure if this will work but hoping
> > it will.
> >
> > Jeff Kilbride suggests a configuration:
> >
> > > www.tld.com
> > >      access to DocumentRoot in httpd.conf
> > >  www.tld.com/mywebapp
> > >      access to the docBase in server.xml
> > >      ability to run JSP files in the docBase directory
> > >  www.tld.com/servlet
> > >      access to servlets/JSP in your WEB-INF/classes directory
> > >      ability to run servlets/JSP from WEB-INF/classes
> >
> > But I would like the config I mentioned earlier if it can work.
> >
> > When I try to follow the same basic configuration you have, I get
> > "Internal Server Error" via a browser request and the mod_jk.log says:
> >
> > [jk_ajp13_worker.c (203)]: connection_tcp_get_message: Error -
> > jk_tcp_socket_rec
> > vfull failed
> > [jk_ajp13_worker.c (619)]: Error reading request
> >
>


Mime
View raw message